MCPcopy
hub / github.com/cenkalti/backoff / NewExponentialBackOff

Function NewExponentialBackOff

exponential.go:65–72  ·  view source on GitHub ↗

NewExponentialBackOff creates an instance of ExponentialBackOff using default values.

()

Source from the content-addressed store, hash-verified

63
64// NewExponentialBackOff creates an instance of ExponentialBackOff using default values.
65func NewExponentialBackOff() *ExponentialBackOff {
66 return &ExponentialBackOff{
67 InitialInterval: DefaultInitialInterval,
68 RandomizationFactor: DefaultRandomizationFactor,
69 Multiplier: DefaultMultiplier,
70 MaxInterval: DefaultMaxInterval,
71 }
72}
73
74// Reset the interval back to the initial retry interval and restarts the timer.
75// Reset must be called before using b.

Callers 7

TestTickerFunction · 0.85
TestRetryFunction · 0.85
TestRetryWithDataFunction · 0.85
TestRetryPermanentFunction · 0.85
RetryFunction · 0.85
TestBackOffFunction · 0.85
TestBackOffOverflowFunction · 0.85

Calls

no outgoing calls

Tested by 6

TestTickerFunction · 0.68
TestRetryFunction · 0.68
TestRetryWithDataFunction · 0.68
TestRetryPermanentFunction · 0.68
TestBackOffFunction · 0.68
TestBackOffOverflowFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…