Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiLimiter ¶
type ApiLimiter struct {
// contains filtered or unexported fields
}
ApiLimiter Api接口调用限速器 合并多个api请求为批量处理请求,需要接口方支持批量处理 例: 300毫秒内
func New ¶
func New(interval int64) *ApiLimiter
func (*ApiLimiter) Action ¶
func (l *ApiLimiter) Action(data interface{}) chan any
Action desc: 添加要处理的数据
func (*ApiLimiter) Close ¶
func (l *ApiLimiter) Close()
type LimiterOption ¶
Click to show internal directories.
Click to hide internal directories.