Documentation ¶
Index ¶
- type Adjuster
- func (g *Adjuster) Destroy() error
- func (g *Adjuster) Init(ctx *plugin.InitContext) error
- func (g *Adjuster) Name() string
- func (g *Adjuster) RealTimeAdjustDynamicWeight(model.InstanceGauge) (bool, error)
- func (g *Adjuster) TimingAdjustDynamicWeight(service model.ServiceInstances) ([]*model.InstanceWeight, error)
- func (g *Adjuster) Type() common.Type
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) RealTimeAdjustDynamicWeight ¶
func (g *Adjuster) RealTimeAdjustDynamicWeight(model.InstanceGauge) (bool, error)
RealTimeAdjustDynamicWeight 实时上报健康状态,并判断是否需要立刻进行动态权重调整,用于流量削峰
func (*Adjuster) TimingAdjustDynamicWeight ¶
func (g *Adjuster) TimingAdjustDynamicWeight(service model.ServiceInstances) ([]*model.InstanceWeight, error)
TimingAdjustDynamicWeight 进行动态权重调整,返回调整后的动态权重
Click to show internal directories.
Click to hide internal directories.