Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRetryConfig = RetryConfig{ MaxRetries: 5, InitialWait: 1 * time.Second, MaxWait: 60 * time.Second, Factor: 2.0, }
DefaultRetryConfig provides sensible defaults for retry operations
Functions ¶
func Is429Error ¶
Is429Error checks if the error is a rate limit (429) error
Types ¶
type RetryConfig ¶
type RetryConfig struct {
MaxRetries int // Maximum number of retry attempts
InitialWait time.Duration // Initial wait time before first retry
MaxWait time.Duration // Maximum wait time between retries
Factor float64 // Exponential backoff factor
}
RetryConfig holds configuration for retry operations
func (RetryConfig) DebugLog ¶
func (c RetryConfig) DebugLog(format string, args ...interface{})
DebugLog logs debug information if verbose mode is enabled
func (RetryConfig) Log ¶
func (c RetryConfig) Log(format string, args ...interface{})
Log prints a message regardless of debug mode
Click to show internal directories.
Click to hide internal directories.