Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Retry ¶
func Retry(body func() (RetrySignal, error), maxRetries int, minDelay time.Duration, maxDelay time.Duration) error
Retry retries the provided function using exponential backoff, starting with `minDelay` between attempts, and increasing to `maxDelay` after each failure. Stops when the provided function returns `FuncComplete`, or `maxRetries` is reached.
Types ¶
type RetrySignal ¶
type RetrySignal = int
const ( FuncFailure RetrySignal = iota FuncComplete FuncError )
Click to show internal directories.
Click to hide internal directories.