Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module containing retry functionality, allowing the construction of services that attempt multiple times in case of transient failure.
- data RetryOptions a
- defaultRetryOptions :: RetryOptions a
- retryingService :: MonadBaseControl IO m => RetryOptions a -> BasicService m a b -> BasicService m a b
- retryAllowed :: RetryOptions a -> a -> Bool
- retryInitialWaitTimeMs :: RetryOptions a -> Int
- maximumRetries :: RetryOptions a -> Int
- retryWaitTimeMultiplier :: RetryOptions a -> Double
Documentation
data RetryOptions a Source
Options for determining behaviour of retrying services.
defaultRetryOptions :: RetryOptions a Source
Defaulted options for retrying 3 times with no wait time.
:: MonadBaseControl IO m | |
=> RetryOptions a | Instance of |
-> BasicService m a b | The service to perform retries of. |
-> BasicService m a b |
Retries a call to a service multiple times, potentially backing off wait times between subsequent calls.
retryAllowed :: RetryOptions a -> a -> Bool Source
Predicate for determining if we can retry a call, can be used to prevent retries on non-idempotent operations.
retryInitialWaitTimeMs :: RetryOptions a -> Int Source
Amount of time to wait after the first failure.
maximumRetries :: RetryOptions a -> Int Source
The upper bound on how many attempts to make when invoking the service.
retryWaitTimeMultiplier :: RetryOptions a -> Double Source
How much to multiply retryInitialWaitTimeMs
by for each number of times the service has retried.