Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackOff ¶
type BackOff interface {
// GetNextBackoffTime returns the duration to wait before retrying the operation.
GetNextBackoffTime()
// Reset to ExponentialBackoff initial state.
ResetExponentialBackoff()
}
BackOff interface defines Exponential-Backoff mechanism.
type ExponentialBackoff ¶
type ExponentialBackoff struct {
Start bool
// contains filtered or unexported fields
}
ExponentialBackoff holds the configuration for the ExponentialBackoff mechanism.
func NewExponentialBackOffConfig ¶
func NewExponentialBackOffConfig(attempt uint, multiplier uint, thresholdTime time.Duration) *ExponentialBackoff
NewExponentialBackOffConfig returns new ExponentialBackoff.
func (*ExponentialBackoff) GetNextBackoffTime ¶
func (e *ExponentialBackoff) GetNextBackoffTime() time.Duration
GetNextBackoffTime returns the duration to wait before retrying the operation.
func (*ExponentialBackoff) ResetExponentialBackoff ¶
func (e *ExponentialBackoff) ResetExponentialBackoff()
ResetExponentialBackoff resets the ExponentialBackoff to initial state.
Click to show internal directories.
Click to hide internal directories.