An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.3% on proxy.golang.org
Top 1.6% dependent packages on proxy.golang.org
Top 2.9% dependent repos on proxy.golang.org
Top 7.3% forks on proxy.golang.org

proxy.golang.org : github.com/taskcluster/httpbackoff

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
License: MPL-2.0
Latest release: about 6 years ago
First release: about 6 years ago
Namespace: github.com/taskcluster
Dependent packages: 11
Dependent repositories: 3
Stars: 12 on GitHub
Forks: 7 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 4 days ago

    Loading...
    Readme
    Loading...