| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Glue.Timeout
Description
Module supporting adding timeouts to a given service.
- data TimeoutOptions
- data TimeoutException = TimeoutException String
- defaultTimeoutOptions :: TimeoutOptions
- addTimeout :: MonadBaseControl IO m => TimeoutOptions -> BasicService m a b -> BasicService m a b
- timeoutDescription :: TimeoutOptions -> String
- timeoutLimitMs :: TimeoutOptions -> Int
Documentation
data TimeoutOptions Source
Options for determining behaviour of services with a timeout.
data TimeoutException Source
Exception thrown when the timeout is exceeded.
Constructors
| TimeoutException String |
defaultTimeoutOptions :: TimeoutOptions Source
Default instance of TimeoutOptions with a timeout of 30 seconds.
Arguments
| :: MonadBaseControl IO m | |
| => TimeoutOptions | Options to configure the timeout. |
| -> BasicService m a b | Service to protect with a timeout. |
| -> BasicService m a b |
Function for producing services protected with a timeout.
timeoutDescription :: TimeoutOptions -> String Source
Description added to the TimeoutException thrown when the timeout is exceeded.
timeoutLimitMs :: TimeoutOptions -> Int Source
Timeout in milliseconds.