An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: 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:
2 versions
Latest release: over 3 years ago
259 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/juju/retry

Dependent Repos 0