Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps around a standard library *http.Client with added retry functionality.
type Option ¶
type Option func(c *Client)
Option is a function that configures a *Client.
func WithRetryPolicy ¶
func WithRetryPolicy(retryPolicy RetryPolicy) Option
WithRetryPolicy sets retry policy for the *Client.
func WithTimeout ¶
WithTimeout sets the timeout of the *Client.
func WithTransport ¶
WithTransport sets the transport for the *Client.
type Retry ¶ added in v0.13.0
Retry is a function that takes an *http.Response and an error and evaluates if a retry should be done.
type RetryPolicy ¶
type RetryPolicy struct { Retry Retry Backoff Backoff MinDelay time.Duration MaxDelay time.Duration MaxRetries int }
RetryPolicy contains rules for retries.
func (RetryPolicy) IsZero ¶ added in v0.13.0
func (r RetryPolicy) IsZero() bool
IsZero returns true if the RetryPolicy is the zero value.
Click to show internal directories.
Click to hide internal directories.