Documentation ¶
Index ¶
- Variables
- func IsErrRetry(err error) bool
- func NewErrRetry(reason string) error
- func NewRetriableHTTPClient(opts ...RetriableHTTPOption) *retryablehttp.Client
- func RetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- type RetriableHTTPOption
- func WithBackoff(backoff retryablehttp.Backoff) RetriableHTTPOption
- func WithCaCert(caCert string) RetriableHTTPOption
- func WithCheckRetry(checkRetry retryablehttp.CheckRetry) RetriableHTTPOption
- func WithDialTimeout(timeout time.Duration) RetriableHTTPOption
- func WithDialer(dialer func(ctx context.Context, network, addr string) (net.Conn, error)) RetriableHTTPOption
- func WithExpectContinueTimeout(timeout time.Duration) RetriableHTTPOption
- func WithIdleConnTimeout(timeout time.Duration) RetriableHTTPOption
- func WithKeepAlive(timeout time.Duration) RetriableHTTPOption
- func WithMaxIdleConns(count int) RetriableHTTPOption
- func WithMaxRetryCount(count int) RetriableHTTPOption
- func WithMaxRetryWait(max time.Duration) RetriableHTTPOption
- func WithMinRetryWait(min time.Duration) RetriableHTTPOption
- func WithProxy(proxy func(req *http.Request) (*url.URL, error)) RetriableHTTPOption
- func WithTLSHandShakeTimeout(timeout time.Duration) RetriableHTTPOption
- func WithTLSInsecureSkipVerify() RetriableHTTPOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRetry = errors.New("retry")
Functions ¶
func IsErrRetry ¶
func NewErrRetry ¶
func NewRetriableHTTPClient ¶
func NewRetriableHTTPClient(opts ...RetriableHTTPOption) *retryablehttp.Client
Types ¶
type RetriableHTTPOption ¶
type RetriableHTTPOption func(*retriableHTTPOptions)
func WithBackoff ¶
func WithBackoff(backoff retryablehttp.Backoff) RetriableHTTPOption
func WithCaCert ¶
func WithCaCert(caCert string) RetriableHTTPOption
func WithCheckRetry ¶
func WithCheckRetry(checkRetry retryablehttp.CheckRetry) RetriableHTTPOption
func WithDialTimeout ¶
func WithDialTimeout(timeout time.Duration) RetriableHTTPOption
func WithDialer ¶
func WithExpectContinueTimeout ¶
func WithExpectContinueTimeout(timeout time.Duration) RetriableHTTPOption
func WithIdleConnTimeout ¶
func WithIdleConnTimeout(timeout time.Duration) RetriableHTTPOption
func WithKeepAlive ¶
func WithKeepAlive(timeout time.Duration) RetriableHTTPOption
func WithMaxIdleConns ¶
func WithMaxIdleConns(count int) RetriableHTTPOption
func WithMaxRetryCount ¶
func WithMaxRetryCount(count int) RetriableHTTPOption
func WithMaxRetryWait ¶
func WithMaxRetryWait(max time.Duration) RetriableHTTPOption
func WithMinRetryWait ¶
func WithMinRetryWait(min time.Duration) RetriableHTTPOption
func WithTLSHandShakeTimeout ¶
func WithTLSHandShakeTimeout(timeout time.Duration) RetriableHTTPOption
func WithTLSInsecureSkipVerify ¶
func WithTLSInsecureSkipVerify() RetriableHTTPOption
Click to show internal directories.
Click to hide internal directories.