MCPcopy Create free account
hub / github.com/eth-easl/dirigent / ExponentialBackoff

Struct ExponentialBackoff

internal/worker_node/managers/exponential_backoff.go:29–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27import "math"
28
29type ExponentialBackoff struct {
30 // interval * exponential_rate ^ retry_number
31 Interval float64
32 ExponentialRate float64
33 RetryNumber float64
34
35 MaxDifference float64
36}
37
38func (eb *ExponentialBackoff) calculate(retry float64) float64 {
39 return eb.Interval * math.Pow(eb.ExponentialRate, retry)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected