# Packages
No description provided by the author
# Functions
No description provided by the author
NewExponentialBackOff creates an instance of ExponentialBackOff using default values.
NewTicker returns a new Ticker containing a channel that will send the time at times specified by the BackOff argument.
Permanent wraps the given err in a *PermanentError.
Retry the operation o until it does not return error or BackOff stops.
RetryNotify calls notify function with the error and wait duration for each failed attempt before sleep.
WithContext returns a BackOffContext with context ctx
ctx must not be nil.
WithMaxRetries creates a wrapper around another BackOff, which will
return Stop if NextBackOff() has been called too many times since
the last time Reset() was called
Note: Implementation is not thread-safe.
# Constants
Default values for ExponentialBackOff.
Default values for ExponentialBackOff.
Default values for ExponentialBackOff.
Default values for ExponentialBackOff.
Default values for ExponentialBackOff.
Infinity indicates that retries will be made indefinitely.
Stop indicates that no more retries should be made for use in NextBackOff().
# Variables
SystemClock implements Clock interface that uses time.Now().
# Structs
ConstantBackOff is a backoff policy that always returns the same backoff delay.
ExponentialBackOff is a backoff implementation that increases the backoff
period for each retry attempt using a randomization function that grows exponentially.
PermanentError signals that the operation should not be retried.
StopBackOff is a fixed backoff policy that always returns backoff.Stop for NextBackOff(), meaning that the operation should never be retried.
Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff.
ZeroBackOff is a fixed backoff policy whose backoff time is always zero, meaning that the operation is retried immediately without waiting, indefinitely.
# Interfaces
BackOff is a backoff policy for retrying an operation.
BackOffContext is a backoff policy that stops retrying after the context is canceled.
Clock is an interface that returns current time for BackOff.