Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackoffTimer ¶
type BackoffTimer struct {
// contains filtered or unexported fields
}
BackoffTimer tracks a given range of intervals with increasing duration
func NewBackoffTimer ¶
func NewBackoffTimer(backoffs ...time.Duration) *BackoffTimer
NewBackoffTimer constructs and returns a *BackoffTimer instance If no backoffs are provided, defaultBackoffs is used. When the last backoff duration has elapsed, the timer will use the final duration for the remainder of the BackoffTimer's lifetime
func (*BackoffTimer) IncreaseInterval ¶
func (b *BackoffTimer) IncreaseInterval()
IncreaseInterval bumps the duration of the interval up to the next given value
func (*BackoffTimer) IntervalElapsed ¶
func (b *BackoffTimer) IntervalElapsed() bool
IntervalElapsed returns if the current interval has elapsed
func (*BackoffTimer) Reset ¶
func (b *BackoffTimer) Reset()
Reset returns BackoffTimer to its original empty state
Click to show internal directories.
Click to hide internal directories.