package
3.0.1
Repository: https://github.com/couchbase/tools-common.git
Documentation: pkg.go.dev

# Functions

IsRetriesAborted returns a boolean indicating whether the given error is a 'RetriesAbortedError'.
IsRetriesExhausted returns a boolean indicating whether the given error is a 'RetriesExhaustedError'.
NewAbortRetriesError returns a wrapped error type, which allows aborting retries.
NewContext wraps the given context with a retry context.
NewRetryer returns a new retryer with the given options.

# Constants

AlgorithmExponential backs off exponentially e.g.
AlgorithmFibonacci backs off using the fibonacci sequence e.g.
AlgorithmLinear backs off linearly e.g.

# Structs

AbortRetriesError allows aborting retries mid-way in the event of a fatal error.
Context wraps the 'context.Context' interface whilst allowing access to useful attributes such as the number of attempts made so far.
RetriesAbortedError is returned when retries have been aborted either due to context cancellation, or through use of the 'AbortRetriesError' sentinel error.
RetriesExhaustedError is returned after exhausting the max number of retries, unwrapping the error will return the error from the last failure.
Retryer is a function retryer, which supports executing a given function a number of times until successful.
RetryerOptions encapsulates the options available when creating a retryer.

# Type aliases

Algorithm represents a retry algorithm used to determine backoff before retrying function execution.
CleanupFunc is a function which is run with the payload for all, but the last retry attempt.
LogFunc is a function which is run before each retry attempt after failing to run the given 'RetryableFunc'.
RetryableFunc represents a function which is retryable.
ShouldRetryFunc is a function which may be supplied to the retry options which allows more control over which types of errors are retried.