// retryHTTPBackoff provides a generic callback for Client.Backoff which
// will pass through all calls based on the status code of the response.
retryHTTPBackoff provides a generic callback for Client.Backoff which
will pass through all calls based on the status code of the response.
// retryHTTPBackoff provides a generic callback for Client . Backoff which // will pass through all calls based on the status code of the response .
func (c *Client) retryHTTPBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration {
	if c.retryLogHook != nil {
		c.retryLogHook(attemptNum, resp)
	}
	if resp != nil && resp.StatusCode == 429 {
		return rateLimitBackoff(min, max, attemptNum, resp)
	}
	min = 700 * time.Millisecond
	max = 900 * time.Millisecond
	return retryablehttp.LinearJitterBackoff(min, max, attemptNum, resp)
}
func ( c * Client ) retryHTTPBackoff ( min , max time . Duration , attemptNum int , resp * http . Response ) time . Duration { if c . retryLogHook != nil { c . retryLogHook ( attemptNum , resp ) } if resp != nil && resp . StatusCode == 429 { return rateLimitBackoff ( min , max , attemptNum , resp ) } min = 700 * time . Millisecond max = 900 * time . Millisecond return retryablehttp . LinearJitterBackoff ( min , max , attemptNum , resp ) }
retryHTTPBackoff provides a generic callback for Client.Backoff which
will pass through all calls based on the status code of the response.
retryHTTPBackoff provides a generic callback for Client . Backoff which will pass through all calls based on the status code of the response .
// Use the rate limit backoff function when we are rate limited. // Set custom duration's when we experience a service interruption.