Interface: aws.RetryerV2
Overview
RetryerV2 is an interface to determine if a given error from an attempt should be retried, and if so what backoff delay to apply. The default implementation used by most services is the retry package’s Standard type. Which contains basic retry logic using exponential backoff.
RetryerV2 replaces the Retryer interface, deprecating the GetInitialToken method in favor of GetAttemptToken which takes a context, and can return an error.
The SDK’s retry package’s Attempt middleware, and utilities will always wrap a Retryer as a RetryerV2. Delegating to GetInitialToken, only if GetAttemptToken is not implemented.
Implemented By
retry.AdaptiveMode, retry.Standard
Interface Method Summary collapse
-
GetAttemptToken(context.Context) (func(error) error, error)
interface
GetAttemptToken returns the send token that can be used to rate limit attempt calls.
-
GetInitialToken() (releaseToken func(error) error)
interface
GetInitialToken returns the initial attempt token that can increment the retry token pool if the attempt is successful.
Interface Method Details
GetAttemptToken(context.Context) (func(error) error, error)
GetAttemptToken returns the send token that can be used to rate limit attempt calls. Will be used by the SDK’s retry package’s Attempt middleware to get a send token prior to calling the temp and releasing the send token after the attempt has been made.
93 |
// File 'aws/retryer.go', line 93
|
GetInitialToken() (releaseToken func(error) error)
GetInitialToken returns the initial attempt token that can increment the retry token pool if the attempt is successful.
Deprecated: This method does not provide a way to block using Context, nor can it return an error. Use RetryerV2, and GetAttemptToken instead.
87 |
// File 'aws/retryer.go', line 87
|