 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func NewRetryableTransport(defaultTransport http.RoundTripper) http.RoundTripper
- func NewRetryableTransportWithOptions(defaultTransport http.RoundTripper, options RetryableTransportOptions) http.RoundTripper
- func RetryOnTransientStateError[T any, U any](action func() (T, error), waiter func() (U, error)) (T, error)
- func RetryWhenAWSErrCodeEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error)
- func RetryWhenAWSErrCodeNotEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error)
- type RetryWhenConfig
- type RetryableTransport
- type RetryableTransportOptions
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var DefaultWaitRetryInterval *time.Duration
    DefaultWaitRetryInterval is used to set the retry interval to 0 during acceptance tests
      View Source
      
  
var ErrRetryWhenTimeout = errors.New("timeout reached")
    Functions ¶
func NewRetryableTransport ¶
func NewRetryableTransport(defaultTransport http.RoundTripper) http.RoundTripper
NewRetryableTransport creates a http transport with retry capability. TODO Retry logic should be moved in the SDK
func NewRetryableTransportWithOptions ¶
func NewRetryableTransportWithOptions(defaultTransport http.RoundTripper, options RetryableTransportOptions) http.RoundTripper
func RetryWhenAWSErrCodeEquals ¶
func RetryWhenAWSErrCodeEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error)
RetryWhenAWSErrCodeEquals retries a function when it returns a specific AWS error
func RetryWhenAWSErrCodeNotEquals ¶
func RetryWhenAWSErrCodeNotEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error)
RetryWhenAWSErrCodeNotEquals retries a function until it returns a specific AWS error
Types ¶
type RetryWhenConfig ¶
type RetryableTransport ¶
type RetryableTransport struct {
	*retryablehttp.Client
}
    RetryableTransport client is a bridge between scw.httpClient interface and retryablehttp.Client
 Click to show internal directories. 
   Click to hide internal directories.