weightedrandom

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WRLoadBalancer

type WRLoadBalancer struct {
	*plugin.PluginBase
	// contains filtered or unexported fields
}

WRLoadBalancer weightedrandom负载均衡插件

func (*WRLoadBalancer) ChooseInstance

func (g *WRLoadBalancer) ChooseInstance(criteria *loadbalancer.Criteria,
	svcInstances model.ServiceInstances) (model.Instance, error)

ChooseInstance 获取单个服务实例

func (*WRLoadBalancer) Destroy

func (g *WRLoadBalancer) Destroy() error

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

func (*WRLoadBalancer) Init

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

Init 初始化插件

func (*WRLoadBalancer) Name

func (g *WRLoadBalancer) Name() string

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

func (*WRLoadBalancer) Type

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

Type 插件类型

Jump to

Keyboard shortcuts

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