Top 0.7% dependent packages on proxy.golang.org
Top 1.6% dependent repos on proxy.golang.org
Top 7.3% forks on proxy.golang.org
proxy.golang.org : github.com/taskcluster/httpbackoff/v3
This package provides exponential backoff support for making HTTP requests. It uses the github.com/cenkalti/backoff algorithm. Network failures and HTTP 5xx status codes qualify for retries. HTTP calls that return HTTP 4xx status codes do not get retried. If the last HTTP request made does not result in a 2xx HTTP status code, an error is returned, together with the data. There are several utility methods that wrap the standard net/http package calls. Any function that takes no arguments and returns (*http.Response, error) can be retried using this library's Retry function. The methods in this library should be able to run concurrently in multiple go routines. Consider this trivial HTTP GET request: This can be rewritten as follows, enabling automatic retries: The variable attempts stores the number of http calls that were made (one plus the number of retries).
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/taskcluster/httpbackoff/v3
License: MPL-2.0
Latest release: about 5 years ago
First release: over 5 years ago
Namespace: github.com/taskcluster/httpbackoff
Dependent packages: 44
Dependent repositories: 11
Stars: 12 on GitHub
Forks: 7 on GitHub
Docker dependents: 1
Docker downloads: 70
See more repository details: repos.ecosyste.ms
Last synced: 27 days ago