Go的无效简单速率限制中间件。-Golang开发

时间:2021-05-26 14:54:57
【文件属性】:
文件名称:Go的无效简单速率限制中间件。-Golang开发
文件大小:43KB
文件格式:ZIP
更新时间:2021-05-26 14:54:57
Golang Middlewares Go的Limiter Dead简单速率限制中间件。 后端Redis支持的简单API“存储”方法(但也没有捆绑)中间件:使用Go模块的HTTP,FastHTTP和Gin安装$ go get Limiter Dead Go的简单速率限制中间件。 后端Redis支持的简单API“存储”方法(但也没有捆绑)中间件:使用Go模块安装HTTP,FastHTTP和Gin $ go get github.com/ulule/limiter/ [电子邮件保护]用法分五个步骤:创建一个限制器.Rate实例(每个周期的请求数)创建一个limiter.Store实例(请参阅Redis或内存中)创建一个limiter.Limiter实例,以store和rate实例作为参数创建一个Middlew
【文件预览】:
limiter-master
----limiter.go(1KB)
----.dockerignore(62B)
----.golangci.yml(1KB)
----go.mod(230B)
----rate_test.go(950B)
----.github()
--------dependabot.yml(162B)
----AUTHORS(135B)
----go.sum(15KB)
----scripts()
--------conf()
--------lint(616B)
--------redis(1KB)
--------test(494B)
--------go-wrapper(1KB)
----.circleci()
--------config.yml(751B)
----options.go(1009B)
----drivers()
--------store()
--------middleware()
----network_test.go(5KB)
----limiter_test.go(330B)
----examples()
--------README.md(638B)
----internal()
--------fasttime()
--------bytebuffer()
----network.go(2KB)
----LICENSE(1KB)
----defaults.go(409B)
----README.md(7KB)
----Makefile(66B)
----.editorconfig(345B)
----.gitignore(14B)
----store.go(1KB)
----rate.go(1013B)

网友评论