MCPcopy Index your code
hub / github.com/imroc/req / SetCommonRetryCount

Method SetCommonRetryCount

client.go:1389–1392  ·  view source on GitHub ↗

SetCommonRetryCount enables retry and set the maximum retry count for requests fired from the client. It will retry infinitely if count is negative.

(count int)

Source from the content-addressed store, hash-verified

1387// fired from the client.
1388// It will retry infinitely if count is negative.
1389func (c *Client) SetCommonRetryCount(count int) *Client {
1390 c.getRetryOption().MaxRetries = count
1391 return c
1392}
1393
1394// SetCommonRetryInterval sets the custom GetRetryIntervalFunc for requests fired
1395// from the client, you can use this to implement your own backoff retry algorithm.

Callers 7

TestRetryOverrideFunction · 0.80
TestAddRetryConditionFunction · 0.80
TestRetryWithModifyFunction · 0.80
TestClientCloneFunction · 0.80
SetCommonRetryCountFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 6

TestRetryOverrideFunction · 0.64
TestAddRetryConditionFunction · 0.64
TestRetryWithModifyFunction · 0.64
TestClientCloneFunction · 0.64