ratedelay

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adjuster

type Adjuster struct {
	*plugin.PluginBase
}

Adjuster 根据错误率和时延来进行动态权重调整

func (*Adjuster) Destroy

func (g *Adjuster) Destroy() error

Destroy 销毁插件,可用于释放资源

func (*Adjuster) Init

func (g *Adjuster) Init(ctx *plugin.InitContext) error

Init 初始化插件

func (*Adjuster) Name

func (g *Adjuster) Name() string

Name 插件名,一个类型下插件名唯一

func (*Adjuster) RealTimeAdjustDynamicWeight

func (g *Adjuster) RealTimeAdjustDynamicWeight(model.InstanceGauge) (bool, error)

RealTimeAdjustDynamicWeight 实时上报健康状态,并判断是否需要立刻进行动态权重调整,用于流量削峰

func (*Adjuster) TimingAdjustDynamicWeight

func (g *Adjuster) TimingAdjustDynamicWeight(service model.ServiceInstances) ([]*model.InstanceWeight, error)

TimingAdjustDynamicWeight 进行动态权重调整,返回调整后的动态权重

func (*Adjuster) Type

func (g *Adjuster) Type() common.Type

Type 插件类型

Jump to

Keyboard shortcuts

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