File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1111// return a DelayFn:
1212// - ConstDelay(delay time.Duration) DelayFn
1313// - ExpJitterDelay(base, max time.Duration) DelayFn
14+ // - ExpJitterDelayWithRand(base, max time.Duration, generator func(int64) int64) DelayFn
1415//
1516// It also provides common retry helpers that return a RetryFn:
1617// - RetryIsErr(func(error) bool) RetryFn
@@ -270,6 +271,8 @@ func ExpJitterDelay(base, max time.Duration) DelayFn {
270271// between 0 and base * 2^attempt capped at max (an exponential
271272// backoff delay with jitter). The generator argument is expected
272273// to generate a random int64 in the half open interval [0, n).
274+ // It is the caller's responsibility to ensure that the function is
275+ // safe for concurrent use.
273276//
274277// See the full jitter algorithm in:
275278// http://www.awsarchitectureblog.com/2015/03/backoff.html
You can’t perform that action at this time.
0 commit comments