MCPcopy
hub / github.com/duke-git/lancet / BackoffStrategy

Interface BackoffStrategy

retry/retry.go:156–159  ·  view source on GitHub ↗

BackoffStrategy is an interface that defines a method for calculating backoff intervals.

Source from the content-addressed store, hash-verified

154
155// BackoffStrategy is an interface that defines a method for calculating backoff intervals.
156type BackoffStrategy interface {
157 // CalculateInterval returns the time.Duration after which the next retry attempt should be made.
158 CalculateInterval() time.Duration
159}
160
161// linear is a struct that implements the BackoffStrategy interface using a linear backoff strategy.
162type linear struct {

Callers 1

RetryFunction · 0.65

Implementers 5

ExampleCustomBackoffStrategyretry/retry_example_test.go
TestCustomBackoffStrategyretry/retry_test.go
linearretry/retry.go
exponentialWithJitterretry/retry.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…