func doBackoffRetry(s autorest.Sender, r *http.Request, backoff *Backoff) (resp *http.Response, err error) {
	rr := autorest.NewRetriableRequest(r)
	// Increment to add the first call (attempts denotes number of retries)
	for backoff.Steps > 0 {
		err = rr.Prepare()
		if err != nil {
			return
		}
		resp, err = s.Do(rr.Request())
		rerr := GetErrorWithRetriableHTTPStatusCodes(resp, err, backoff.RetriableHTTPStatusCodes)
		// Abort retries in the following scenarios:
		// 1) request succeed
		// 2) request is not retriable
		// 3) request has been throttled
		// 4) request contains non-retriable errors
		// 5) request has completed all the retry steps
		if rerr == nil || !rerr.Retriable || rerr.IsThrottled() || backoff.isNonRetriableError(rerr) || backoff.Steps == 1 {
			return resp, rerr.Error()
		}

		if !delayForBackOff(backoff, r.Context().Done()) {
			if r.Context().Err() != nil {
				return resp, r.Context().Err()
			}
			return resp, rerr.Error()
		}

		klog.V(3).Infof("Backoff retrying %s %q with error %v", r.Method, r.URL.String(), rerr)
	}

	return resp, err
}
// doBackoffRetry does the backoff retries for the request.
doBackoffRetry does the backoff retries for the request.
// doBackoffRetry does the backoff retries for the request .
func doBackoffRetry(s autorest.Sender, r *http.Request, backoff *Backoff) (resp *http.Response, err error) {
	rr := autorest.NewRetriableRequest(r)
	for backoff.Steps > 0 {
		err = rr.Prepare()
		if err != nil {
			return
		}
		resp, err = s.Do(rr.Request())
		rerr := GetErrorWithRetriableHTTPStatusCodes(resp, err, backoff.RetriableHTTPStatusCodes)
		if rerr == nil || !rerr.Retriable || rerr.IsThrottled() || backoff.isNonRetriableError(rerr) || backoff.Steps == 1 {
			return resp, rerr.Error()
		}
		if !delayForBackOff(backoff, r.Context().Done()) {
			if r.Context().Err() != nil {
				return resp, r.Context().Err()
			}
			return resp, rerr.Error()
		}
		klog.V(3).Infof("Backoff retrying %s %q with error %v", r.Method, r.URL.String(), rerr)
	}
	return resp, err
}
func doBackoffRetry ( s autorest . Sender , r * http . Request , backoff * Backoff ) ( resp * http . Response , err error ) { rr := autorest . NewRetriableRequest ( r ) for backoff . Steps > 0 { err = rr . Prepare ( ) if err != nil { return } resp , err = s . Do ( rr . Request ( ) ) rerr := GetErrorWithRetriableHTTPStatusCodes ( resp , err , backoff . RetriableHTTPStatusCodes ) if rerr == nil || ! rerr . Retriable || rerr . IsThrottled ( ) || backoff . isNonRetriableError ( rerr ) || backoff . Steps == 1 { return resp , rerr . Error ( ) } if ! delayForBackOff ( backoff , r . Context ( ) . Done ( ) ) { if r . Context ( ) . Err ( ) != nil { return resp , r . Context ( ) . Err ( ) } return resp , rerr . Error ( ) } klog . V ( 3 ) . Infof ( " " , r . Method , r . URL . String ( ) , rerr ) } return resp , err }
doBackoffRetry does the backoff retries for the request.
doBackoffRetry does the backoff retries for the request .
// Increment to add the first call (attempts denotes number of retries) // Abort retries in the following scenarios: // 1) request succeed // 2) request is not retriable // 3) request has been throttled // 4) request contains non-retriable errors // 5) request has completed all the retry steps