# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewLimiter returns a new Limiter that allows events up to rate r.
NewRateCollector is shorthand for newRateCollector(window, granularity, time.Now()).
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
Inf is the infinite rate limit; it allows all events.
# Variables
No description provided by the author
# Structs
A Limiter controls how frequently events are allowed to happen.
RateCollector helps to collect and calculate values (like throughput, QPS, TPS, etc...), It implements a sliding window with custom size and granularity to store values.
# Type aliases
Limit defines the maximum frequency of some events.