Registry / utility / segmentio-backo-go

segmentio-backo-go

JSON →
library1.1.0gogounverified

Package backo implements exponential backoff with jitter for retry logic.

go get github.com/segmentio/backo-go
INSTALL
IMPORT
SIG · SEGMENTIO-BACKO-GO
S
segmentio-backo-go
utilitygov1.1.0
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.

backo
github.com/segmentio/backo-go

Create a backoff policy and compute wait durations for retries.

package main import ( "fmt" "time" "github.com/segmentio/backo-go" ) func main() { b := backo.NewBacko(100*time.Millisecond, 2, 10*time.Second) for i := 0; i < 3; i++ { duration := b.Duration(i) fmt.Printf("Attempt %d: wait %v\n", i, duration) } }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
segmentio-backo-go — go get segmentio-backo-go · libregistry