feat: code cleanup

This commit is contained in:
2026-01-04 12:49:56 +08:00
parent 9f9f62f598
commit ab445203aa
4 changed files with 7 additions and 110 deletions

View File

@@ -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 // 重置