SetRetryCount enables retry and set the maximum retry count. It will retry infinitely if count is negative.
(count int)
| 1165 | // SetRetryCount enables retry and set the maximum retry count. |
| 1166 | // It will retry infinitely if count is negative. |
| 1167 | func (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. |