arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.FailureGate

Description

Repeat suppression for a failure a looping action keeps hitting.

Synopsis

Documentation

Source #data FailureGate

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

Source #newFailureGate :: MonadIO m => m FailureGate

A gate for one repeating action, starting healthy.

Source #holdFailure :: MonadIO m => FailureGate -> NominalDiffTime -> Text -> m Bool

Take failure as the one the gate holds. True when it is worth reporting.

Source #clearFailure :: MonadIO m => FailureGate -> m Bool

Drop whatever the gate holds. True when it held a failure.

Source #defaultFailureRepeatInterval :: NominalDiffTime

Gap between repeats of a standing failure.