Interface: request.Retryer

import "../ibm-cos-sdk-go/aws/request"

Overview

Retryer provides the interface drive the SDK's request retry behavior. The Retryer implementation is responsible for implementing exponential backoff, and determine if a request API error should be retried.

client.DefaultRetryer is the SDK's default implementation of the Retryer. It uses the Request.IsErrorRetryable and Request.IsErrorThrottle methods to determine if the request is retried.

Implemented By

client.DefaultRetryer, client.NoOpRetryer

Interface Method Summary collapse

Interface Method Details

MaxRetries() int

This method is abstract.

MaxRetries is the number of times a request may be retried before failing.



33
// File 'aws/request/retryer.go', line 33

MaxRetries() int

RetryRules(*Request) time.Duration

This method is abstract.

RetryRules return the retry delay that should be used by the SDK before making another request attempt for the failed request.



22
// File 'aws/request/retryer.go', line 22

RetryRules(*Request) time.Duration

ShouldRetry(*Request) bool

This method is abstract.

ShouldRetry returns if the failed request is retryable.

Implementations may consider request attempt count when determining if a request is retryable, but the SDK will use MaxRetries to limit the number of attempts a request are made.



29
// File 'aws/request/retryer.go', line 29

ShouldRetry(*Request) bool