Package Usage: go: github.com/slok/goresilience
Package goresilience is a framework/lirbary of utilities to improve the resilience of
programs easily.
The library is based on `goresilience.Runner` interface, this runners can be
chained using the decorator pattern (like std library `http.Handler` interface).
This makes the library being extensible, flexible and clean to use.
The runners can be chained like if they were middlewares that could act on
all the execution process of the `goresilience.Func`.
Will use a single runner, the retry with the default settings
this will make the `gorunner.Func` to be executed and retried N times if it fails.
Will use more than one `goresilience.Runner` and chain them to create a very
resilient execution of the `goresilience.Func`.
In this case we will create a runner that retries and also times out. And we will configure the
timeout.
Will measure all the execution through the runners uwing prometheus metrics.
Is an example to show that when the result is not needed we don't need to
use and inline function.
Is an example to show that we could use objects aslo to pass parameter and get our results.
2 versions
Latest release: over 6 years ago
32 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/slok/goresilience