Versions in this module Expand all Collapse all v1 v1.20.76 Nov 28, 2023 Changes in this version + const DefaultInitialInterval + const DefaultMaxElapsedTime + const DefaultMaxInterval + const DefaultMultiplier + const DefaultRandomizationFactor + const Stop + var SystemClock = systemClock + func Retry(o Operation, b BackOff) error + func RetryNotify(operation Operation, b BackOff, notify Notify) error + type BackOff interface + NextBackOff func() time.Duration + Reset func() + func WithMaxRetries(b BackOff, max uint64) BackOff + type BackOffContext interface + Context func() context.Context + func WithContext(b BackOff, ctx context.Context) BackOffContext + type Clock interface + Now func() time.Time + type ConstantBackOff struct + Interval time.Duration + func NewConstantBackOff(d time.Duration) *ConstantBackOff + func (b *ConstantBackOff) NextBackOff() time.Duration + func (b *ConstantBackOff) Reset() + type ExponentialBackOff struct + Clock Clock + InitialInterval time.Duration + MaxElapsedTime time.Duration + MaxInterval time.Duration + Multiplier float64 + RandomizationFactor float64 + func NewExponentialBackOff() *ExponentialBackOff + func (b *ExponentialBackOff) GetElapsedTime() time.Duration + func (b *ExponentialBackOff) NextBackOff() time.Duration + func (b *ExponentialBackOff) Reset() + type Notify func(error, time.Duration) + type Operation func() error + type PermanentError struct + Err error + func Permanent(err error) *PermanentError + func (e *PermanentError) Error() string + type StopBackOff struct + func (b *StopBackOff) NextBackOff() time.Duration + func (b *StopBackOff) Reset() + type Ticker struct + C <-chan time.Time + func NewTicker(b BackOff) *Ticker + func (t *Ticker) Stop() + type ZeroBackOff struct + func (b *ZeroBackOff) NextBackOff() time.Duration + func (b *ZeroBackOff) Reset()