Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAbort = errors.New("retry loop aborted") ErrExhausted = errors.New("retry tries exhaused") )
Functions ¶
Types ¶
type Option ¶
type Option func(*RetryOptions)
func WithBackoffFactor ¶
func WithJitter ¶
func WithMaxDelay ¶
func WithMaxTries ¶
type RetryOptions ¶
type RetryOptions struct {
MaxTries int
Delay time.Duration
MaxDelay time.Duration
BackoffFactor float64
Jitter bool
Rand func() float64
}
func DefaultRetryOptions ¶
func DefaultRetryOptions() RetryOptions
Click to show internal directories.
Click to hide internal directories.