Documentation ¶
Overview ¶
Package rate provides a rate limiter hooker, this package is based on golang.org/x/time/rate
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
Limiter controls the frequency of handling events.
func NewLimiter ¶
NewLimiter returns a new Limiter Pointer.
type LimiterManager ¶
type LimiterManager[K comparable] struct { // contains filtered or unexported fields }
LimiterManager ...
func NewManager ¶
func NewManager[K comparable](interval time.Duration, burst int) *LimiterManager[K]
NewManager ..
Click to show internal directories.
Click to hide internal directories.