feat: code cleanup
This commit is contained in:
@@ -9,14 +9,11 @@ package abstract
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.zhangdeman.cn/zhangdeman/rate_limit/define"
|
||||
)
|
||||
|
||||
// IRateLimit 流控实现接口约束
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 11:33 2024/6/20
|
||||
type IRateLimit interface {
|
||||
AllowN(ctx context.Context, limitCfg *define.LimitConfig, tokenCnt int) (bool, error) // 申请N个令牌, N >= 0
|
||||
Reset(ctx context.Context, limitCfg *define.LimitConfig) error // 重置
|
||||
|
||||
Reference in New Issue
Block a user