Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPermanent ¶
IsPermanent returns true if the error is a PermanentError.
Types ¶
type Backoff ¶
type Backoff struct {
// InitialInterval is the initial duration to wait before the first retry.
InitialInterval time.Duration
// MaxInterval is the upper bound on the backoff duration.
MaxInterval time.Duration
// Multiplier is the factor by which the backoff interval increases after each failure.
Multiplier float64
// MaxElapsedTime is the maximum total time to spend retrying. If 0, retries indefinitely.
MaxElapsedTime time.Duration
}
Backoff defines an exponential backoff policy for retrying operations.
type PermanentError ¶
type PermanentError struct {
Err error
}
PermanentError is an error that should not be retried.
func (*PermanentError) Error ¶
func (e *PermanentError) Error() string
func (*PermanentError) Unwrap ¶
func (e *PermanentError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.