Documentation ¶
Index ¶
- type Config
- type RateLimiterUniformRate
- func (g *RateLimiterUniformRate) Destroy() error
- func (g *RateLimiterUniformRate) Init(ctx *plugin.InitContext) error
- func (g *RateLimiterUniformRate) InitQuota(criteria *ratelimiter.InitCriteria) (ratelimiter.QuotaBucket, error)
- func (g *RateLimiterUniformRate) IsEnable(cfg config.Configuration) bool
- func (g *RateLimiterUniformRate) Name() string
- func (g *RateLimiterUniformRate) Type() common.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiterUniformRate ¶
type RateLimiterUniformRate struct { *plugin.PluginBase // contains filtered or unexported fields }
基于匀速排队策略的限流控制器
func (*RateLimiterUniformRate) Destroy ¶
func (g *RateLimiterUniformRate) Destroy() error
Destroy 销毁插件,可用于释放资源
func (*RateLimiterUniformRate) Init ¶
func (g *RateLimiterUniformRate) Init(ctx *plugin.InitContext) error
Init 初始化插件
func (*RateLimiterUniformRate) InitQuota ¶
func (g *RateLimiterUniformRate) InitQuota(criteria *ratelimiter.InitCriteria) (ratelimiter.QuotaBucket, error)
初始化并创建限流窗口 主流程会在首次调用,以及规则对象变更的时候,调用该方法
func (*RateLimiterUniformRate) IsEnable ¶
func (g *RateLimiterUniformRate) IsEnable(cfg config.Configuration) bool
enable ?
func (*RateLimiterUniformRate) Name ¶
func (g *RateLimiterUniformRate) Name() string
Name 插件名,一个类型下插件名唯一
Click to show internal directories.
Click to hide internal directories.