限流器使用中间件完成

This commit is contained in:
2025-05-08 11:37:34 +08:00
parent bfbcecb498
commit 4767aeb504
3 changed files with 27 additions and 15 deletions

View File

@ -16,3 +16,8 @@ var (
ErrMethodIsEmpty = errors.New("METHOD_IS_EMPTY") // 请求 方法为空
ErrMethodIsNotSupport = errors.New("METHOD_IS_NOT_SUPPORT") // 请求 method不支持
)
var (
// ErrRateLimitExceeded v2版本中命中流控的错误信息
ErrRateLimitExceeded = errors.New("rate limit exceeded")
)