Versions in this module Expand all Collapse all v1 v1.0.1 Jan 3, 2021 Changes in this version type Option + func WithRetryForever() Option v1.0.0 Sep 4, 2019 Changes in this version + func Continue(b Backoff) bool + func IsPermanentError(err error) bool + func MarkPermanent(err error) error + func Retry(ctx context.Context, p Policy, e Executer) error + type Backoff interface + Done func() <-chan struct{} + Next func() <-chan struct{} + type CancelFunc func() + type Constant struct + func NewConstant(delay time.Duration, options ...Option) *Constant + func (p *Constant) Start(ctx context.Context) (Backoff, CancelFunc) + type ExecuteFunc func(context.Context) error + func (f ExecuteFunc) Execute(ctx context.Context) error + type Executer interface + Execute func(context.Context) error + type Exponential struct + func NewExponential(options ...Option) *Exponential + func (p *Exponential) Start(ctx context.Context) (Backoff, CancelFunc) + type Option interface + Name func() string + Value func() interface{} + func WithFactor(v float64) Option + func WithInterval(v time.Duration) Option + func WithJitterFactor(v float64) Option + func WithMaxElapsedTime(v time.Duration) Option + func WithMaxInterval(v time.Duration) Option + func WithMaxRetries(v int) Option + type PermanentError interface + IsPermanent func() bool + type Policy interface + Start func(context.Context) (Backoff, CancelFunc) Other modules containing this package github.com/lestrrat-go/backoff/v2