Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfNecessary ¶ added in v0.49.0
IfNecessary retries the operation in exponential backoff with the retry Options.
func IsErrorRetryable ¶ added in v0.54.0
IsErrorRetryable makes a HEURISTIC determination whether it is worth retrying upon encountering an error. That heuristic is NOT STABLE and it CAN CHANGE AT ANY TIME. Callers that have a hard requirement for specific treatment of a class of errors should make their own check instead of relying on this function maintaining its past behavior.
Types ¶
type Options ¶ added in v0.49.0
type Options struct { MaxRetry int // The number of times to possibly retry. Delay time.Duration // The delay to use between retries, if set. IsErrorRetryable func(error) bool }
Options defines the option to retry.
type RetryOptions ¶
type RetryOptions = Options // nolint:revive
RetryOptions is deprecated, use Options.
Click to show internal directories.
Click to hide internal directories.