proxy.golang.org : 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.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/%21cloudflare/backoff
License: BSD-2-Clause
Latest release: about 2 hours ago
Namespace: github.com/Cloudflare
Stars: 47 on GitHub
Forks: 8 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 hours ago