Package Usage: go: github.com/cloudflare/backoff
Package backoff contains an implementation of an intelligent backoff
strategy. It is based on the approach in the AWS architecture blog
article titled "Exponential Backoff And Jitter", which is found at
http://www.awsarchitectureblog.com/2015/03/backoff.html.
Essentially, the backoff has an interval `time.Duration`; the nth
call to backoff will return a `time.Duration` that is 2^n *
interval. If jitter is enabled (which is the default behaviour),
the duration is a random value between 0 and 2^n * interval. The
backoff is configured with a maximum duration that will not be
exceeded.
The `New` function will attempt to use the system's cryptographic
random number generator to seed a Go math/rand random number
source. If this fails, the package will panic on startup.
1 version
Latest release: over 8 years ago
78 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/cloudflare/backoff