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 ..
func (*LimiterManager[K]) Delete ¶ added in v1.7.5
func (l *LimiterManager[K]) Delete(key K)
Delete 删除对应限速器
Click to show internal directories.
Click to hide internal directories.