MCPcopy Create free account
hub / github.com/imroc/req / SetRetryFixedInterval

Method SetRetryFixedInterval

request.go:1186–1191  ·  view source on GitHub ↗

SetRetryFixedInterval set retry to use a fixed interval.

(interval time.Duration)

Source from the content-addressed store, hash-verified

1184
1185// SetRetryFixedInterval set retry to use a fixed interval.
1186func (r *Request) SetRetryFixedInterval(interval time.Duration) *Request {
1187 r.getRetryOption().GetRetryInterval = func(resp *Response, attempt int) time.Duration {
1188 return interval
1189 }
1190 return r
1191}
1192
1193// SetRetryBackoffInterval set retry to use a capped exponential backoff with jitter.
1194// https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

Callers 3

TestRetryFixedIntervalFunction · 0.80
TestRetryOverrideFunction · 0.80
SetRetryFixedIntervalFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 2

TestRetryFixedIntervalFunction · 0.64
TestRetryOverrideFunction · 0.64