package
2.0.0+incompatible
Repository: https://github.com/fighting2520/go-common.git
Documentation: pkg.go.dev

# Functions

Every 如果interval是limit的时间间隔, 每秒的令牌数量 Every interval 每个Limit 的最小时间间隔.
NewLimiter 实例化一个限制器.
No description provided by the author

# Constants

Inf 无限速 Limit 允许任何事件(即使burst是0).
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
Reservation 保存 Limiter 允许在延迟后发生的事件的信息。 A Reservation 可以被取消, 可以使 Limiter 允许更多事件.

# Type aliases

Limit 定义某些事件的最大频率。 Limit 表示为每秒的事件数。 zero Limit 不允许任何事件.