Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
MaxRetries int
BaseDelay time.Duration
MaxDelay time.Duration
BackoffMultiple float64
}
Config holds the configuration for retry logic
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a sensible default retry configuration
type ErrorChecker ¶
ErrorChecker defines a function that determines if an error should trigger a retry
type Logger ¶
type Logger func(message string, args ...interface{})
Logger defines a function for logging retry attempts
type Options ¶
type Options struct {
Config Config
ErrorChecker ErrorChecker
Logger Logger
APIName string
}
Options configures retry behavior
type RetryExhaustedError ¶
type RetryExhaustedError struct {
APIName string
MaxAttempts int
LastStatusCode int
LastResponse []byte
}
RetryExhaustedError represents an error when all retry attempts have been exhausted
func (*RetryExhaustedError) Error ¶
func (e *RetryExhaustedError) Error() string
Click to show internal directories.
Click to hide internal directories.