Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backoffer ¶
type Backoffer interface {
// Backoff returns the duration to wait for the retryCnt-th retry.
// retryCnt starts from 0.
Backoff(retryCnt int) time.Duration
}
Backoffer is the interface to get backoff.
type Exponential ¶
type Exponential struct {
// contains filtered or unexported fields
}
Exponential implements the exponential backoff algorithm without jitter. should create one instance for each operation that need retry.
func NewExponential ¶
func NewExponential(baseBackoff time.Duration, multiplier float64, maxBackoff time.Duration) *Exponential
NewExponential creates a new Exponential backoff.
Click to show internal directories.
Click to hide internal directories.