Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exponential ¶
type Exponential struct {
// contains filtered or unexported fields
}
Exponential configures an exponential backoff strategy.
func NewExponential ¶
func NewExponential(baseDelay, maxDelay time.Duration, factor, jitter float64) *Exponential
NewExponential returns a new exponential backoff strategy.
func (Exponential) ForAttempt ¶
func (b Exponential) ForAttempt(n int) time.Duration
forAttempt returns the duration to wait for the n-th attempt.
Click to show internal directories.
Click to hide internal directories.