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

Top 3.7% on proxy.golang.org
Top 0.3% dependent packages on proxy.golang.org
Top 0.2% dependent repos on proxy.golang.org
Top 7.7% forks on proxy.golang.org
Top 1.8% docker downloads on proxy.golang.org

proxy.golang.org : github.com/juju/retry

The retry package encapsulates the mechanism around retrying commands. The simple use is to call retry.Call with a function closure. The bare minimum arguments that need to be specified are: Any error that is returned from the Func is considered transient. In order to identify some errors as fatal, pass in a function for the IsFatalError CallArgs value. In order to have the Delay change for each iteration, a BackoffFunc needs to be set on the CallArgs. A simple doubling delay function is provided by DoubleDelay. An example of a more complex BackoffFunc could be a stepped function such as: Consider some package foo that has a TryAgainError, which looks something like this: and we create something that looks like this: Then we could do this:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/juju/retry
License: LGPL-3.0
Latest release: 8 months ago
First release: about 3 years ago
Namespace: github.com/juju
Dependent packages: 259
Dependent repositories: 928
Stars: 16 on GitHub
Forks: 6 on GitHub
Docker dependents: 6
Docker downloads: 98
See more repository details: repos.ecosyste.ms
Last synced: 10 days ago

    Loading...
    Readme
    Loading...