# Packages
No description provided by the author
# Functions
Action tries to execute 'run' following verdicts from arbiter, with delay decided by 'officer'.
BackoffSelector allows change the backoff delays between retries.
Constant sleeps for duration duration.
DefaultMetadataNotifier provides a default Notifier focused on metadata issues.
DefaultNotifier provides a default Notifier.
DefaultNotifierWithContext Provides a notified based on context 'ctx'.
DefaultTimeoutSelector provides a default selector between hard and soft timeouts.
Exponential sleeps for duration base * 2^tries.
Fibonacci sleeps for duration * fib(tries).
Incremental sleeps for duration + the number of tries.
LimitError creates an error of type ErrLimit.
Linear sleeps for duration * the number of tries.
Max errors after a limited number of tries, while the last try returned an error.
Min errors after a limited number of tries, while the last try returned an error.
NewAction is a constructor for action.
NotifyByLog logs the status of each try.
No description provided by the author
PrevailDone aggregates verdicts from Arbiters for a try: - Returns Abort and the error as soon as an Abort is decided.
PrevailRetry aggregates verdicts from Arbiters for a try: - Returns Abort and the error as soon as an arbiter decides for an Abort.
No description provided by the author
StopRetryError creates an error of type ErrStopRetry.
Successful returns Retry when the try produced no error; returns Done otherwise.
No description provided by the author
No description provided by the author
Timeout returns Abort after a duration of time passes since the first try, while the try returns an error; returns Done if no error occurred during the last try.
TimeoutError creates an error of type ErrTimeout.
TimeoutSelector chooses between loops with hard timeout or loops with soft timeout.
Unsuccessful returns Retry when the try produced an error; returns Done otherwise.
WhileSuccessful retries while 'run' is successful (ie 'run' returns an error == nil), waiting a duration of 'delay' after each try, expiring after a duration of 'timeout'.
WhileUnsuccessful retries every 'delay' while 'run' is unsuccessful with a 'timeout'.
WhileUnsuccessfulWithAggregator allows using another ArbiterAggregator instead of the default PrevailDone.
WhileUnsuccessfulWithHardTimeout retries every 'delay' while 'run' is unsuccessful with a 'timeout'.
WhileUnsuccessfulWithHardTimeoutWithNotifier retries every 'delay' while 'run' is unsuccessful with a 'timeout'.
WhileUnsuccessfulWithLimitedRetries uses Unsuccessful and Max arbiters.
WhileUnsuccessfulWithNotify retries while 'run' is unsuccessful (ie 'run' returns an error != nil), waiting 'delay' after each try, expiring after 'timeout'.
# Variables
CommonArbiter allows between 5 and 10 retries.
DefaultArbiter allows 10 retries, with a maximum duration of 30 seconds.
# Type aliases
Arbiter sleeps or selects any amount of time for each attempt.
ArbiterAggregator this type helps easy replacement of PrevailDone.
Backoff is the type that must implement algorithms that space out retries to avoid congestion.
ErrLimit is used when a limit is reached.
ErrStopRetry is returned when the context needs to stop the retries.
ErrTimeout is used when a timeout occurs.
Notify ...
No description provided by the author