Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBackoff = NewExponentialWithJitter(128*time.Millisecond, 1*time.Minute)
DefaultBackoff is our opinionated Backoff function for retry.WithBackoff - between 128ms and 1m.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
Backoff returns the backoff duration for a specific retry attempt.
func NewExponentialWithJitter ¶
NewExponentialWithJitter returns an exponentially increasing Backoff implementation.
The calculated time.Duration values are within [min, max], exponentially increasing and slightly randomized. If min or max are zero or negative, they will default to 100ms and 10s, respectively. It panics if min >= max.
Click to show internal directories.
Click to hide internal directories.