hasql-pool-1.0.1: Pool of connections for Hasql
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • UUID

    Generated connection ID. For grouping the observations by one connection.

  • ConnectionStatus

    Status that the connection has entered.

Instances

Instances details
Show Observation Source # 
Instance details

Defined in Hasql.Pool.Observation

Eq Observation Source # 
Instance details

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

Connection is established and not occupied.

InUseConnectionStatus

Is being used by some session.

After it's done the status will transition to ReadyForUseConnectionStatus or TerminatedConnectionStatus.

TerminatedConnectionStatus ConnectionTerminationReason

Connection terminated.

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 release procedure.