Documentation
¶
Overview ¶
Package retry provides utilities for retrying operations with exponential backoff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// MaxAttempts is the maximum number of retry attempts
MaxAttempts int
// InitialDelay is the delay before the first retry
InitialDelay time.Duration
// MaxDelay is the maximum delay between retries
MaxDelay time.Duration
// Multiplier is the factor by which delay increases after each attempt
Multiplier float64
// Jitter is the maximum random variation added to delays (0.0 to 1.0)
Jitter float64
}
Config configures retry behavior.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a default retry configuration.
Click to show internal directories.
Click to hide internal directories.