Registry / utility / juju-retry

juju-retry

JSON →
library1.0.1gogounverified

The retry package encapsulates the mechanism around retrying commands with configurable backoff and fatal error detection.

go get github.com/juju/retry
INSTALL
IMPORT
SIG · JUJU-RETRY
J
juju-retry
utilitygov1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

retry
github.com/juju/retry

Retry a function up to 3 times with a 100ms delay between attempts.

package main import ( "fmt" "time" "github.com/juju/retry" ) func main() { err := retry.Call(retry.CallArgs{ Func: func() error { return fmt.Errorf("transient error") }, Attempts: 3, Delay: 100 * time.Millisecond, }) fmt.Println(err) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
juju-retry — go get juju-retry · libregistry