Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExponentialBackoff ¶
type ExponentialBackoff struct {
InitialInterval time.Duration
MaxInterval time.Duration
MaxElapsedTime time.Duration // 0 means no limit
// contains filtered or unexported fields
}
ExponentialBackoff holds configuration for exponential backoff retry.
func (*ExponentialBackoff) NextBackOff ¶
func (b *ExponentialBackoff) NextBackOff() time.Duration
NextBackOff returns the next wait interval, capped at MaxInterval.
func (*ExponentialBackoff) Reset ¶
func (b *ExponentialBackoff) Reset()
Reset resets the backoff interval to initial state.
type PermanentError ¶
type PermanentError struct {
Err error
}
PermanentError wraps an error to signal that retrying should stop.
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.