Documentation ¶
Index ¶
- func DefaultSuccess(err error) bool
- type Backoff
- func ExponentialBackoff(min time.Duration, max time.Duration, factor float64) Backoff
- func ExponentialBackoffWithSuccess(min time.Duration, max time.Duration, factor float64, success Success) Backoff
- func LinearBackoff(attempts int, duration time.Duration) Backoff
- func LinearBackoffWithSuccess(attempts int, duration time.Duration, success Success) Backoff
- type OnErr
- type Operation
- type Success
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backoff ¶
The backoff function
func ExponentialBackoff ¶
Performs an operation with an exponential backoff
func ExponentialBackoffWithSuccess ¶
func ExponentialBackoffWithSuccess(min time.Duration, max time.Duration, factor float64, success Success) Backoff
Performs an operation with an exponential backoff using a custom success condition
func LinearBackoff ¶
Performs an operation with a linear backoff
Click to show internal directories.
Click to hide internal directories.