glue-core-0.4.2: Make better services and clients.

Safe HaskellNone
LanguageHaskell2010

Glue.Timeout

Description

Module supporting adding timeouts to a given service.

Synopsis

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.

addTimeout Source

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.