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)
| 1440 | // request should retry. |
| 1441 | // It will override other retry conditions if any been added before. |
| 1442 | func (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. |