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

Method AddCommonRetryCondition

client.go:1449–1453  ·  view source on GitHub ↗

AddCommonRetryCondition adds a retry condition, which determines whether the request should retry.

(condition RetryConditionFunc)

Source from the content-addressed store, hash-verified

1447// AddCommonRetryCondition adds a retry condition, which determines whether the
1448// request should retry.
1449func (c *Client) AddCommonRetryCondition(condition RetryConditionFunc) *Client {
1450 ro := c.getRetryOption()
1451 ro.RetryConditions = append(ro.RetryConditions, condition)
1452 return c
1453}
1454
1455// SetUnixSocket set client to dial connection use unix socket.
1456// For example:

Callers 2

TestAddRetryConditionFunction · 0.80
AddCommonRetryConditionFunction · 0.80

Calls 1

getRetryOptionMethod · 0.95

Tested by 1

TestAddRetryConditionFunction · 0.64