Versions in this module Expand all Collapse all v1 v1.0.1 Jun 3, 2021 v1.0.0 May 31, 2021 Changes in this version + type RateLimiter struct + func NewRateLimiter(bursts int, limit rate.Limit, ttl time.Duration) *RateLimiter + func (th RateLimiter) Allow(item string) bool + func (th RateLimiter) OnEvicted(fn func(item string, lim *rate.Limiter)) + func (th RateLimiter) Remove(item string) + func (th RateLimiter) Reserve(item string) *rate.Reservation + func (th RateLimiter) Wait(item string, ctx context.Context) error