Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*TokenLimit)
type TokenLimit ¶
type TokenLimit struct {
// contains filtered or unexported fields
}
TokenLimit controls how frequently events are allowed to happen with in one second.
func NewTokenLimiter ¶
func NewTokenLimiter(key string, opts ...Option) *TokenLimit
NewTokenLimiter returns a PeriodLimit object. opts can be used to customize the PeriodLimit.
Click to show internal directories.
Click to hide internal directories.