Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backoff ¶
type Backoff struct {
// contains filtered or unexported fields
}
Backoff provides a simple backoff iterator for custom retry loops
type Config ¶
type Config struct {
InitialDelay time.Duration // Initial delay before first retry
MaxDelay time.Duration // Maximum delay between retries
MaxRetries int // Maximum number of retry attempts
Multiplier float64 // Backoff multiplier
JitterFactor float64 // Jitter factor (0.0 to 1.0)
}
Config holds retry configuration
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns the default retry configuration
func FastConfig ¶
func FastConfig() Config
FastConfig returns a configuration for fast retries (used for lock conflicts)
type RetryableReader ¶
type RetryableReader struct {
// contains filtered or unexported fields
}
RetryableReader wraps an io.Reader to add retry capability for read operations
func NewRetryableReader ¶
func NewRetryableReader(ctx context.Context, cfg Config, op, key string, reader func() ([]byte, error)) *RetryableReader
NewRetryableReader creates a new retryable reader
Click to show internal directories.
Click to hide internal directories.