Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype RepromoteDelay = RepromoteDelay {}
- data ExitPolicy a = ExitPolicy {}
- stdExitPolicy :: ReturnPolicy a -> ExitPolicy a
- type ReturnPolicy a = a -> RepromoteDelay
- alwaysCleanReturnPolicy :: RepromoteDelay -> ExitPolicy a
Documentation
newtype RepromoteDelay Source #
After demoting a peer to Warm or Cold, we use a delay to re-promote it back.
Instances
data ExitPolicy a Source #
ReturnPolicy
allows to compute reconnection delay from value return by
a mini-protocol. If a mini-protocol returned with an error epErrorDelay
is used.
ExitPolicy | |
|
stdExitPolicy :: ReturnPolicy a -> ExitPolicy a Source #
ExitPolicy
with 10s error delay.
type ReturnPolicy a = a -> RepromoteDelay Source #
alwaysCleanReturnPolicy Source #
:: RepromoteDelay | re-promote delay on error |
-> ExitPolicy a |