Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 is retained for existing API providers. Despite its historical name, it now delegates to the shared transient classifier so every provider receives the same retry coverage.
func IsTransient ¶ added in v0.0.207
IsTransient reports whether an error is safe to retry without changing the request. It deliberately excludes ordinary client/configuration failures so those remain fast-fail. Providers use this shared classifier to avoid drift between HTTP APIs and local agent CLIs.
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