| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Hasql.Pool.Observation
Description
Interface for processing observations of the status of the pool.
Provides a flexible mechanism for monitoring the healthiness of the pool via logs and metrics without any opinionated choices on the actual monitoring technologies. Specific interpreters are encouraged to be created as extension libraries.
Synopsis
Documentation
data Observation #
An observation of a change of the state of a pool.
Constructors
| ConnectionObservation | Status of one of the pool's connections has changed. |
Fields
| |
Instances
| Eq Observation # | |
Defined in Hasql.Pool.Observation | |
| Show Observation # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> Observation -> ShowS # show :: Observation -> String # showList :: [Observation] -> ShowS # | |
data ConnectionStatus #
Status of a connection.

Constructors
| ConnectingConnectionStatus | Connection is being established. This is the initial status of every connection. |
| ReadyForUseConnectionStatus ConnectionReadyForUseReason | Connection is established and not occupied. |
| InUseConnectionStatus | Is being used by some session. After it's done the status will transition to |
| TerminatedConnectionStatus ConnectionTerminationReason | Connection terminated. |
Instances
| Eq ConnectionStatus # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionStatus -> ConnectionStatus -> Bool # (/=) :: ConnectionStatus -> ConnectionStatus -> Bool # | |
| Show ConnectionStatus # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionStatus -> ShowS # show :: ConnectionStatus -> String # showList :: [ConnectionStatus] -> ShowS # | |
data ConnectionReadyForUseReason #
Constructors
| EstablishedConnectionReadyForUseReason | Connection just got established. |
| SessionFailedConnectionReadyForUseReason SessionError | Session execution ended with a failure that does not require a connection reset. |
| SessionSucceededConnectionReadyForUseReason | Session execution ended with success. |
Instances
| Eq ConnectionReadyForUseReason # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionReadyForUseReason -> ConnectionReadyForUseReason -> Bool # (/=) :: ConnectionReadyForUseReason -> ConnectionReadyForUseReason -> Bool # | |
| Show ConnectionReadyForUseReason # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionReadyForUseReason -> ShowS # show :: ConnectionReadyForUseReason -> String # showList :: [ConnectionReadyForUseReason] -> ShowS # | |
data ConnectionTerminationReason #
Explanation of why a connection was terminated.
Constructors
| AgingConnectionTerminationReason | The age timeout of the connection has passed. |
| IdlenessConnectionTerminationReason | The timeout of how long a connection may remain idle in the pool has passed. |
| NetworkErrorConnectionTerminationReason (Maybe Text) | The connection became unusable and had to be discarded. This includes connectivity issues with the server as well as fatal session errors that invalidate the connection's prepared statement or type caches. |
| ReleaseConnectionTerminationReason | User has invoked the |
| InitializationErrorTerminationReason SessionError | Initialization session failure. |
Instances
| Eq ConnectionTerminationReason # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionTerminationReason -> ConnectionTerminationReason -> Bool # (/=) :: ConnectionTerminationReason -> ConnectionTerminationReason -> Bool # | |
| Show ConnectionTerminationReason # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionTerminationReason -> ShowS # show :: ConnectionTerminationReason -> String # showList :: [ConnectionTerminationReason] -> ShowS # | |