weightadjuster

package
v1.3.0-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 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 Proxy

type Proxy struct {
	WeightAdjuster
	// contains filtered or unexported fields
}

Proxy is a proxy for weight adjuster plugin

func (*Proxy) SetRealPlugin

func (p *Proxy) SetRealPlugin(plug plugin.Plugin, engine model.Engine)

SetRealPlugin 设置

type WeightAdjuster

type WeightAdjuster interface {
	plugin.Plugin
	// RealTimeAdjustDynamicWeight 实时上报健康状态,并判断是否需要立刻进行动态权重调整,用于流量削峰
	RealTimeAdjustDynamicWeight(model.InstanceGauge) (bool, error)
	// TimingAdjustDynamicWeight 进行动态权重调整,返回调整后的动态权重
	TimingAdjustDynamicWeight(service model.ServiceInstances) ([]*model.InstanceWeight, error)
}

WeightAdjuster 【扩展点接口】动态权重调整接口

Jump to

Keyboard shortcuts

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