# Functions
IntervalDuration returns a function that calculates a static interveral duration.
IntervalExponential returns a function that calculates an interval duration for the next retry, based on the current number of attempts and the base number/unit.
IntervalFibonacci returns a function that calculates an interval duration for the next retry, based on the current number of attempts and the base number/unit.
NewRetrier takes one or more RetrierOpt functions, creates a new Retrier, sets the fields specified in the RetrierOpts, and returns a pointer to the new Retrier.
Retry is a function that takes a Retryable interface and a context.
WithIntervalFunc allows the caller to define a function to calculate the interval between retries (IntervalExponential and IntervalFibonacci are available for this purpose).
WithMaxRetries allows the caller to define a max number of retries.
WithOnlyRetryErrors allows the caller to define a list of errors upon which to retry.
WithRetrierFunc allows the caller to define the operation to be run/retried.
# Constants
MaxRetriesUnlimited is the value of our max retries when we don't have a maximum.
# Variables
No description provided by the author
# Structs
Retrier is a struct that allows the caller to define their parameters for retrying an operation.
# Interfaces
Retryable is an interface that allows the caller to specify the operation to be executed, the interval to wait between retries, and whether to retry or not.
# Type aliases
RetrierOpt is a function that takes a pointer to a Retrier and returns that same pointer, allowing some actions to be performed upon the Retrier — for example, setting some of its fields.
RetryInterval is a function that takes an integer that defines the attempt number.