Safe Haskell | None |
---|---|
Language | Haskell2010 |
Rage limiting of accepted connections
Synopsis
- data AcceptedConnectionsLimit = AcceptedConnectionsLimit {}
- runConnectionRateLimits :: (MonadSTM m, MonadDelay m) => Tracer m AcceptConnectionsPolicyTrace -> STM m Int -> AcceptedConnectionsLimit -> m ()
- data AcceptConnectionsPolicyTrace
Documentation
data AcceptedConnectionsLimit Source #
Policy which governs how to limit the number of accepted connections.
AcceptedConnectionsLimit | |
|
Instances
runConnectionRateLimits :: (MonadSTM m, MonadDelay m) => Tracer m AcceptConnectionsPolicyTrace -> STM m Int -> AcceptedConnectionsLimit -> m () Source #
Get the number of current connections, make decision based on
AcceptedConnectionsLimit
and execute it.
Tracing
data AcceptConnectionsPolicyTrace Source #
Trace for the AcceptConnectionsLimit
policy.
ServerTraceAcceptConnectionRateLimiting DiffTime Int | |
ServerTraceAcceptConnectionHardLimit Word32 | |
ServerTraceAcceptConnectionResume Int |