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

Method SetCommonRetryCondition

client.go:1442–1445  ·  view source on GitHub ↗

SetCommonRetryCondition sets the retry condition, which determines whether the request should retry. It will override other retry conditions if any been added before.

(condition RetryConditionFunc)

Source from the content-addressed store, hash-verified

1440// request should retry.
1441// It will override other retry conditions if any been added before.
1442func (c *Client) SetCommonRetryCondition(condition RetryConditionFunc) *Client {
1443 c.getRetryOption().RetryConditions = []RetryConditionFunc{condition}
1444 return c
1445}
1446
1447// AddCommonRetryCondition adds a retry condition, which determines whether the
1448// request should retry.

Callers 4

TestRetryOverrideFunction · 0.80
TestRetryWithModifyFunction · 0.80
SetCommonRetryConditionFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 3

TestRetryOverrideFunction · 0.64
TestRetryWithModifyFunction · 0.64