Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + type FailureRecord struct + ErrorMsg string + ErrorType string + Model string + Provider string + Recovered bool + RecoveryDelay time.Duration + RetryCount int + Timestamp time.Time + type Item = RetryItem + type Queue = RetryQueue + func NewQueue() *Queue + type RetryConfigFromProvider interface + BackoffMultiplier func() float64 + BaseDelayMs func() int + JitterPct func() int + MaxDelayMs func() int + MaxRetries func() int + type RetryDecision struct + Delay time.Duration + FallbackModel string + FallbackProvider string + Reason string + ShouldRetry bool + type RetryItem struct + Args map[string]interface{} + Attempts int + CreatedAt time.Time + Error string + ID string + MaxAttempts int + NextRetry time.Time + Operation string + Priority int + Status string + type RetryQueue struct + BackoffBase time.Duration + BackoffMax time.Duration + Items []*RetryItem + MaxSize int + func NewRetryQueue() *RetryQueue + func (rq *RetryQueue) CalculateBackoff(attempts int) time.Duration + func (rq *RetryQueue) Clear() + func (rq *RetryQueue) Dequeue() *RetryItem + func (rq *RetryQueue) Enqueue(operation string, args map[string]interface{}, err string, priority int) *RetryItem + func (rq *RetryQueue) FormatQueue() string + func (rq *RetryQueue) GetPending() []*RetryItem + func (rq *RetryQueue) GetReady() []*RetryItem + func (rq *RetryQueue) MarkFailed(id string, err string) + func (rq *RetryQueue) MarkSuccess(id string) + func (rq *RetryQueue) Prune() + func (rq *RetryQueue) Size() int + type RetryStrategy struct + AbortOn []string + BackoffMultiplier float64 + BaseDelay time.Duration + JitterPct float64 + MaxDelay time.Duration + MaxRetries int + Provider string + RetryOn []string + type SmartRetry struct + FailureHistory []FailureRecord + MaxHistorySize int + Strategies map[string]*RetryStrategy + func NewSmartRetry() *SmartRetry + func (sr *SmartRetry) AdaptStrategy(provider string) + func (sr *SmartRetry) CalculateDelay(strategy *RetryStrategy, attempt int) time.Duration + func (sr *SmartRetry) ClassifyError(err error) string + func (sr *SmartRetry) ConfigureFromProvider(provider string, cfg RetryConfigFromProvider) + func (sr *SmartRetry) Decide(provider, model string, err error, attempt int) *RetryDecision + func (sr *SmartRetry) FormatStatus() string + func (sr *SmartRetry) GetProviderHealth() map[string]string + func (sr *SmartRetry) RecordRecovery(provider, model string, recoveryDelay time.Duration) + func (sr *SmartRetry) ResetProvider(provider string) + func (sr *SmartRetry) ShouldFallback(provider string) (bool, string)