Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Types related to resizing a connection pool
Resize connection pools, on-demand, based on underlying server replicas
See @resizeSourcePools
in Hasura.RQL.Types.Backend
Synopsis
- data ServerReplicas
- unsafeServerReplicas :: Word -> ServerReplicas
- oneServerReplica :: ServerReplicas
- safeServerReplicas :: Int -> Either Text ServerReplicas
- getServerReplicasInt :: ServerReplicas -> Int
- data ResizePoolStrategy
- data SourceResizePoolSummary = SourceResizePoolSummary {}
- noPoolsResizedSummary :: SourceResizePoolSummary
Documentation
data ServerReplicas Source #
Number of server instances. A wrapper over Word
type, a non-negative integer
with the same size as Int
. Useful for resize a connection pool.
Instances
Show ServerReplicas Source # | |
Defined in Hasura.RQL.Types.ResizePool showsPrec :: Int -> ServerReplicas -> ShowS # show :: ServerReplicas -> String # showList :: [ServerReplicas] -> ShowS # | |
Eq ServerReplicas Source # | |
Defined in Hasura.RQL.Types.ResizePool (==) :: ServerReplicas -> ServerReplicas -> Bool # (/=) :: ServerReplicas -> ServerReplicas -> Bool # |
safeServerReplicas :: Int -> Either Text ServerReplicas Source #
Safely build ServerReplicas
from non-negative and non-zero Int
value.
getServerReplicasInt :: ServerReplicas -> Int Source #
Get server replic count in @Int
data ResizePoolStrategy Source #
A strategy for resizing a pool
NeverResizePool | Never resize the pool |
ResizePool Int | Resize the pool by using provided total maximum connections |
data SourceResizePoolSummary Source #
Summary of a source's pools resize. Predominantly used to log.
Instances
Show SourceResizePoolSummary Source # | |
Defined in Hasura.RQL.Types.ResizePool showsPrec :: Int -> SourceResizePoolSummary -> ShowS # show :: SourceResizePoolSummary -> String # showList :: [SourceResizePoolSummary] -> ShowS # | |
Eq SourceResizePoolSummary Source # | |
Defined in Hasura.RQL.Types.ResizePool |