arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.FailureGate

Description

Internal to the arbiter packages. Not covered by the PVP.

Repeated failure suppression for a looping action.

Synopsis

Documentation

data FailureGateSource #

The last failure a repeating action reported and its time. Empty while healthy.

newFailureGate :: MonadIO m => m FailureGateSource #

A gate for one repeating action, starting healthy.

holdFailure :: MonadIO m => FailureGate -> NominalDiffTime -> Text -> m BoolSource #

Record failure when reporting is due. True when it is due.

clearFailure :: MonadIO m => FailureGate -> m BoolSource #

Clear the recorded failure. True when one was recorded.

defaultFailureRepeatInterval :: NominalDiffTimeSource #

Gap between repeats of a standing failure.