流控接口定义 + 基于redis的流控实现

This commit is contained in:
2024-06-20 11:50:38 +08:00
parent f093b5c8ef
commit e4bd913390
4 changed files with 199 additions and 0 deletions

10
go.mod
View File

@@ -1,3 +1,13 @@
module git.zhangdeman.cn/zhangdeman/rate_limit
go 1.22.4
require (
github.com/go-redis/redis/v8 v8.11.5
github.com/go-redis/redis_rate/v9 v9.1.2
)
require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
)