| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Glue.Failover
Description
Module supporting failover of a service by transforming the request each time a failure occurs up to a fixed number of attempts.
- data FailoverOptions a
- defaultFailoverOptions :: FailoverOptions a
- failover :: MonadBaseControl IO m => FailoverOptions a -> BasicService m a b -> BasicService m a b
- maxFailovers :: FailoverOptions a -> Int
- transformFailoverRequest :: FailoverOptions a -> a -> a
Documentation
data FailoverOptions a Source
Options for determining behaviour of failover services.
defaultFailoverOptions :: FailoverOptions a Source
Simple defaults that results in retrying 3 times in a dumb way immediately without transforming the request.
Arguments
| :: MonadBaseControl IO m | |
| => FailoverOptions a | Instance of |
| -> BasicService m a b | The service to perform failover around. |
| -> BasicService m a b |
Creates a service that can transform requests with each subsequent failure.
maxFailovers :: FailoverOptions a -> Int Source
The maximum numer of times the service will failover and make another attempt.
transformFailoverRequest :: FailoverOptions a -> a -> a Source
Each time the service performs a failover, transform the request with this function.