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

Method SetRetryCount

request.go:1167–1170  ·  view source on GitHub ↗

SetRetryCount enables retry and set the maximum retry count. It will retry infinitely if count is negative.

(count int)

Source from the content-addressed store, hash-verified

1165// SetRetryCount enables retry and set the maximum retry count.
1166// It will retry infinitely if count is negative.
1167func (r *Request) SetRetryCount(count int) *Request {
1168 r.getRetryOption().MaxRetries = count
1169 return r
1170}
1171
1172// SetRetryInterval sets the custom GetRetryIntervalFunc, you can use this to
1173// implement your own backoff retry algorithm.

Callers 9

testRetryFunction · 0.80
TestRetryOverrideFunction · 0.80
TestAddRetryConditionFunction · 0.80
TestRetryWithSetResultFunction · 0.80
TestRetryFalseFunction · 0.80
SetRetryCountFunction · 0.80
TestSetFileWithRetryFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 8

testRetryFunction · 0.64
TestRetryOverrideFunction · 0.64
TestAddRetryConditionFunction · 0.64
TestRetryWithSetResultFunction · 0.64
TestRetryFalseFunction · 0.64
TestSetFileWithRetryFunction · 0.64