Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackoffUntil ¶
func BackoffUntil(f func() (bool, error), backoff BackoffManager, sliding bool, stopCh <-chan struct{})
Types ¶
type BackoffFunc ¶
type BackoffManager ¶
type BackoffManager interface {
Backoff(previousDuration time.Duration, previousConditionError bool) time.Duration
}
func NewFastBackoffManager ¶
func NewFastBackoffManager(options FastBackoffOptions) BackoffManager
type FastBackoffOptions ¶
type FastBackoffOptions struct { Duration time.Duration Factor float64 Jitter float64 MaxDuration time.Duration InitDurationIfFail time.Duration // If FastRetryCount > 0, then within the FastRetryWindow time window, // the retry will be performed with a delay of FastRetryDelay for the first FastRetryCount calls. FastRetryCount int FastRetryDelay time.Duration FastRetryJitter float64 FastRetryWindow time.Duration }
Click to show internal directories.
Click to hide internal directories.