| 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 Source #
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
| Show Observation Source # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> Observation -> ShowS # show :: Observation -> String # showList :: [Observation] -> ShowS # | |
| Eq Observation Source # | |
Defined in Hasql.Pool.Observation | |
data ConnectionStatus Source #
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
| Show ConnectionStatus Source # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionStatus -> ShowS # show :: ConnectionStatus -> String # showList :: [ConnectionStatus] -> ShowS # | |
| Eq ConnectionStatus Source # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionStatus -> ConnectionStatus -> Bool # (/=) :: ConnectionStatus -> ConnectionStatus -> Bool # | |
data ConnectionReadyForUseReason Source #
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
| Show ConnectionReadyForUseReason Source # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionReadyForUseReason -> ShowS # show :: ConnectionReadyForUseReason -> String # showList :: [ConnectionReadyForUseReason] -> ShowS # | |
| Eq ConnectionReadyForUseReason Source # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionReadyForUseReason -> ConnectionReadyForUseReason -> Bool # (/=) :: ConnectionReadyForUseReason -> ConnectionReadyForUseReason -> Bool # | |
data ConnectionTerminationReason Source #
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) | Connectivity issues with the server. |
| ReleaseConnectionTerminationReason | User has invoked the |
| InitializationErrorTerminationReason SessionError | Initialization session failure. |
Instances
| Show ConnectionTerminationReason Source # | |
Defined in Hasql.Pool.Observation Methods showsPrec :: Int -> ConnectionTerminationReason -> ShowS # show :: ConnectionTerminationReason -> String # showList :: [ConnectionTerminationReason] -> ShowS # | |
| Eq ConnectionTerminationReason Source # | |
Defined in Hasql.Pool.Observation Methods (==) :: ConnectionTerminationReason -> ConnectionTerminationReason -> Bool # (/=) :: ConnectionTerminationReason -> ConnectionTerminationReason -> Bool # | |