Documentation ¶
Index ¶
- type WRLoadBalancer
- func (g *WRLoadBalancer) ChooseInstance(criteria *loadbalancer.Criteria, svcInstances model.ServiceInstances) (model.Instance, error)
- func (g *WRLoadBalancer) Destroy() error
- func (g *WRLoadBalancer) Init(ctx *plugin.InitContext) error
- func (g *WRLoadBalancer) Name() string
- func (g *WRLoadBalancer) Type() common.Type
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) Init ¶
func (g *WRLoadBalancer) Init(ctx *plugin.InitContext) error
Init 初始化插件
Click to show internal directories.
Click to hide internal directories.