# Functions
Build creates a Goroutine-safe factory for backoffs from a generator factory and zero or more rule factories.
Constant creates a generator factory that uses the same given step duration for each successive backoff.
DecorrelatedExponential creates a generator factory for a specialized type of exponential backoff algorithm that applies a random jitter to the factor instead of to the value produced.
DecorrelatedExponentialWithRandFactory returns a decorrelated exponential option that sets the random number generator source for a decorrelated exponential factory instance.
EqualJitter creates a rule factory that applies a random jitter to half of the duration.
Exponential creates a generator factory for backoffs that start at the given initial duration and increase multiplicatively by the specified factor.
FullJitter creates a rule factory that applies a random jitter to the entire duration.
Jitter creates a rule factory that applies a random jitter to a portion of the duration.
JitterWithRandFactory returns a jitter option that sets the random number generator source for a jitter factory instance.
Linear creates a generator factory that uses the specified step value to use to increase the backoff amount each time.
MaxAttempts creates a rule factory that limits the number of possible attempts made, producing an error every time Next() is called after that.
MaxBound creates a rule factory that guarantees a duration is never more than a specified value.
MaxRetries for a given maximum count is the same as calling MaxAttempts(max+1).
MinBound creates a rule factory that guarantees a duration is never less than a specified value.
Once creates a one-time-use backoff using the given generator factory and rule factories.
ResetAfter creates a generator factory that replaces a delegate backoff factory with a fresh instance (i.e., resets its internal state) after a certain amount of time has elapsed between calls to Next().
ResetAfterWithClock changes the clock to the specified one.
# Variables
Immediate is a generator factory for no backoff.
NonSliding causes the first iteration of a backoff to be zero instead of an initial backoff amount determined by the generator.
# Structs
Backoff is a combination of a generator of backoff durations and zero or more rules that adjust the generated duration amounts.
DecorrelatedExponentialOptions allow for customization of the underlying decorrelated exponential algorithm.
Factory is a Goroutine-safe factory for creating backoff instances.
JitterOptions allow for customization of the underlying jitter algorithm.
MaxAttemptsReachedError is the error produced by the MaxAttempts rule when the limit has been reached.
ResetAfterOptions allows the behavior of ResetAfter to be customized.
# Interfaces
DecorrelatedExponentialOption is a setter for one or more decorrelated exponential options.
Generator produces new durations based on a particular algorithm.
GeneratorFactory provides a Goroutine-safe factory for creating generators of a particular algorithm.
JitterOption is a setter for one or more jitter options.
ResetAfterOption is a setter for one or more reset-after algorithm options.
Rule adjusts a backoff duration by applying additional logic like jitter or bounding.
RuleFactory is a Goroutine-safe factory for creating rules that apply to a particular algorithm.
RuleInjector allows a backoff to customize rule application, for example, if it needs to use the result of the rule application as part of its algorithm.
# Type aliases
DecorrelatedExponentialOptionFunc allows a function to be used as a decorrelated exponential option.
JitterOptionFunc allows a function to be used as a jitter option.
ResetAfterOptionFunc allows a function to be used as a reset-after algorithm option.
Rules encodes a list of rules as a single rule.