limit

command
v0.0.0-...-201036b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

README

三种限流模式

速率限流

每秒请求>100次,触发限流,限流后的请求,直接返回错误。 通过时间和次数,进行限流,形式多样化,比如:20次/每3秒。

错误限流

比如1分钟内,某接口出错100此,则出发限流模式

延迟限流

比如3秒内,仅允许1个请求。如果3秒内,有2个请求过来,则第二个请求,不会立刻返回限流错误,会等待3秒,然后执行。

自定义限流机制

如果都不满足,可以自己定义触发限流的机制

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL