Interface: aws.RetryerV2

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

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

Interface Method Details

GetAttemptToken(context.Context) (func(error) error, error)

This method is abstract.

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

GetAttemptToken(context.Context) (func(error) error, error)

GetInitialToken() (releaseToken func(error) error)

This method is abstract.

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

GetInitialToken() (releaseToken func(error) error)