Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶ added in v0.21.0
type Options struct {
// Initial is the initial backoff duration.
Initial time.Duration
// Max is the maximum backoff duration for a single retry attempt.
// It does not limit the total time of all retries.
Max time.Duration
// Multiplier is the factor by which the backoff duration is multiplied after each attempt.
Multiplier float64
// MaxAttempts is the maximum number of attempts before giving up.
MaxAttempts int
}
Options defines the configuration for the Retryer.
type Retryer ¶
type Retryer struct {
// contains filtered or unexported fields
}
Retryer handles retry logic for HTTP requests using a configurable backoff strategy.
func NewWithOptions ¶ added in v0.21.0
NewWithOptions returns a new Retryer with the specified backoff strategy. If any option is not set (zero value), it defaults to the values used in New().
Click to show internal directories.
Click to hide internal directories.