Versions in this module Expand all Collapse all v0 v0.0.3 Sep 16, 2021 v0.0.1 Sep 16, 2021 Changes in this version + type Backoff struct + Clock clock2.Clock + func NewBackOff(initial, max time.Duration) *Backoff + func NewFakeBackOff(initial, max time.Duration, tc *clock2.FakeClock) *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) + type Clock interface + Now func() time.Time + Sleep func(time.Duration) + type RateLimiter interface + Accept func() + QPS func() float32 + Stop func() + TryAccept func() bool + func NewFakeAlwaysRateLimiter() RateLimiter + func NewFakeNeverRateLimiter() RateLimiter + func NewTokenBucketRateLimiter(qps float32, burst int) RateLimiter + func NewTokenBucketRateLimiterWithClock(qps float32, burst int, c Clock) RateLimiter