Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultRetryWaitMinSeconds = 1 DefaultRetryWaitMaxSeconds = 60 DefaultRetryMax = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRetry ¶
type RetryConfig ¶
type RetryConfig struct { // Logger - Logger eclog.Logger // The minimum wait time for retries on API errors RetryWaitMin *time.Duration // The maximum wait time for retries on API errors RetryWaitMax *time.Duration // The maximum number of retries on API errors RetryMax *int // CheckRetry is a handler that allows users to define custom logic // to determine whether the API Client should retry a failed API call CheckRetry CheckRetry }
type RetryableHTTPClientAdapter ¶
type RetryableHTTPClientAdapter struct { RetryableHttpClient *retryablehttp.Client HasCustomRetry bool }
Adapts the client from the retryablehttp library
func NewRetryableHTTPClientAdapter ¶
func NewRetryableHTTPClientAdapter( config RetryConfig, ) *RetryableHTTPClientAdapter
Click to show internal directories.
Click to hide internal directories.