Versions in this module Expand all Collapse all v1 v1.1.0 Aug 12, 2022 Changes in this version type Strategy + func Delays(delays ...time.Duration) Strategy + func ExpDelay(seed time.Duration) Strategy v1.0.0 Aug 12, 2022 Changes in this version + func Exec(retryableFunc RetryableFunc, strategies ...Strategy) (err error) + func ExecContext(ctx context.Context, retryableFunc RetryableContextFunc, ...) (err error) + func GetUnrecoverableErrorCause(unrecoverableErr error) (cause error, ok bool) + func IsUnrecoverable(err error) bool + func Sleep(ctx context.Context, delay time.Duration) bool + func Unrecoverable(err error) error + type RetryableContextFunc func(ctx context.Context, retryNumber int) (err error) + type RetryableFunc func(retryNumber int) (err error) + type Strategy interface + Attempt func(ctx context.Context) (attempt bool) + func Compose(strategies ...Strategy) Strategy + func DefaultStrategy() Strategy + func ExpStrategy(seed time.Duration) Strategy + func FixedDelay(delay time.Duration) Strategy + func FromDelays(delays ...time.Duration) Strategy + func Function(retryFunc StrategyFunc) Strategy + func Infinite() Strategy + func MaxAttempts(attempts int) Strategy + func PowDelay(seed time.Duration, base float64) Strategy + func RandomDelay(min time.Duration, max time.Duration) Strategy + type StrategyFunc func(ctx context.Context) (attempt bool) + type UnrecoverableError struct