// RetryMaxRetries returns a RetryFn that retries if the number of
// retries is less than or equal to max.
519557
func RetryMaxRetries(max int) RetryFn {
	return func(attempt Attempt) bool {
		// < instead of <= because attempt.Index is 0-based, so if max = 1
		// (1 retry), it will return true when attempt.Index == 0 only.
		return attempt.Index < max
	}
}
1241345
func (s *HlsInputSettings) SetRetries(v int64) *HlsInputSettings {
	s.Retries = &v
	return s
}
41756
func Retry(fn RetryFunc) Option {
	return func(o *Options) {
		o.CallOptions.Retry = fn
	}
}
50228
func (s *ListBonusPaymentsInput) SetMaxResults(v int64) *ListBonusPaymentsInput {
	s.MaxResults = &v
	return s
}
337362
func (pool *Pool) RetryAfter(after time.Duration) *Pool {
	pool.conf.RetryAfter = after
	return &Pool{redis: pool.redis, conf: pool.conf}
}
1258624
func RetryableError(err error) *RetryError {
	if err == nil {
		return nil
	}
	return &RetryError{Err: err, Retryable: true}
}
906075
func (s *ListRecoveryPointsByBackupVaultInput) SetMaxResults(v int64) *ListRecoveryPointsByBackupVaultInput {
	s.MaxResults = &v
	return s
}
1312595
func IsRetryableError(err error) bool {
	e, ok := err.(JSONError)
	return ok && e.Retry
}
52051
func (c *Config) WithMaxRetries(max int) *Config {
	c.MaxRetries = &max
	return c
}
470151
func (m *MockRCHTTPClienter) SetMaxRetries(arg0 int) {
	m.ctrl.Call(m, "SetMaxRetries", arg0)
}
749255
func (m *MockRCHTTPClienter) GetMaxRetries() int {
	ret := m.ctrl.Call(m, "GetMaxRetries")
	ret0, _ := ret[0].(int)
	return ret0
}
1042167
func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput {
	s.MaxResults = &v
	return s
}
656323
func (l *retryLoop) ShouldRetry(err error) bool {
	if err == zk.ErrSessionExpired || err == zk.ErrSessionMoved {
		return true
	}

	if netErr, ok := err.(net.Error); ok {
		return netErr.Timeout() || netErr.Temporary()
	}

	return false
}
150025
func (c *retryRepository) shouldRetry(count int, err error) bool {
	if err == nil {
		return false
	}
	retryAfter, ok := isTemporaryHTTPError(err)
	if !ok {
		return false
	}
	if count >= c.retries {
		return false
	}
	c.sleepFn(retryAfter)
	klog.V(4).Infof("Retrying request to Docker registry after encountering error (%d attempts remaining): %v", count, err)
	return true
}
1164369
func retryParams() retry.Iterator {
	return &retry.ExponentialBackoff{
		Limited: retry.Limited{
			Delay:    50 * time.Millisecond,
			Retries:  50,
			MaxTotal: 5 * time.Second,
		},
		Multiplier: 2,
	}
}
1069723
func (s *JobUpdate) SetMaxRetries(v int64) *JobUpdate {
	s.MaxRetries = &v
	return s
}
471827
func (r *StopRetrier) Retry(ctx context.Context, retry int, req *http.Request, resp *http.Response, err error) (time.Duration, bool, error) {
	return 0, false, nil
}