Versions in this module Expand all Collapse all v1 v1.1.1 Sep 29, 2026 Changes in this version + var ErrMaxRetries = errors.New("reached max retries") type BackoffStrategy + func NewBackoffStrategyWithFactory(factory func() Generator, durationUnit time.Duration) BackoffStrategy v1.0.1 Jan 25, 2024 Changes in this version + type BackoffStrategy struct + func NewBackoffStrategy(generator Generator, durationUnit time.Duration) BackoffStrategy + func (b BackoffStrategy) Delay() (time.Duration, error) + func (b BackoffStrategy) WithCappedDuration(cappedDuration time.Duration) BackoffStrategy + func (b BackoffStrategy) WithJitter(jitter time.Duration) BackoffStrategy + func (b BackoffStrategy) WithMaxRetries(maxRetries int64) BackoffStrategy + type Caller struct + func NewCaller() Caller + func (c Caller) Call(ctx context.Context, f func() error) (err error) + func (c Caller) WithMaxDuration(maxDuration time.Duration) Caller + func (c Caller) WithRetriableError(err error, strategy BackoffStrategy) Caller + func (c Caller) WithRetryOnAnyError(strategy BackoffStrategy) Caller + type Generator interface + Next func() int64 + func NewConstant(c int64) Generator + func NewExponential(factor int64) Generator + func NewFibonacci() Generator + func NewLinear(delta int64) Generator + func NewRandom(max int64) Generator