Documentation ¶
Index ¶
- type Backoff
- func (p *Backoff) DeleteEntry(id string)
- func (p *Backoff) GC()
- func (p *Backoff) Get(id string) time.Duration
- func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool
- func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool
- func (p *Backoff) Next(id string, eventTime time.Time)
- func (p *Backoff) Reset(id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
func NewBackOff ¶
func (*Backoff) DeleteEntry ¶
func (*Backoff) GC ¶
func (p *Backoff) GC()
Garbage collect records that have aged past maxDuration. Backoff users are expected to invoke this periodically.
func (*Backoff) IsInBackOffSince ¶
Returns True if the elapsed time since eventTime is smaller than the current backoff window
func (*Backoff) IsInBackOffSinceUpdate ¶
Returns True if time since lastupdate is less than the current backoff window.
Click to show internal directories.
Click to hide internal directories.