Documentation
¶
Index ¶
Constants ¶
View Source
const ClientTimeoutEnvKey string = "NV_HTTP_CLIENT_TIMEOUT"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOptions ¶
type ClientOptions struct {
RetryWaitMin time.Duration
RetryWaitMax time.Duration
RetryMax int
CheckRetry retryablehttp.CheckRetry
Backoff retryablehttp.Backoff
ErrorHandler retryablehttp.ErrorHandler
PrepareRetry retryablehttp.PrepareRetry
}
Retryable client options.
type Option ¶
type Option func(*features)
func WithAppVersionUserAgent ¶
WithAppVersionUserAgent when called will add a User-Agent header to each client request with the provided appName plus the version.
func WithClientOptions ¶
func WithClientOptions(co ClientOptions) Option
WithClientOptions sets retryablehttp.Client fields corresponding to those in co.
func WithClientTimeout ¶
WithClientTimeout specifies the HTTP client's timeout it's recommended to set the timeout to something 30 seconds or greater due to the retryable client timeout being included in this value
func WithRequestHeader ¶
WithRequestHeader overwrites request header for all requests
Click to show internal directories.
Click to hide internal directories.