Documentation ¶
Index ¶
- type Config
- type LoadBalancer
- func (g *LoadBalancer) ChooseInstance(criteria *loadbalancer.Criteria, inputInstances model.ServiceInstances) (model.Instance, error)
- func (g *LoadBalancer) Destroy() error
- func (g *LoadBalancer) Init(ctx *plugin.InitContext) error
- func (g *LoadBalancer) Name() string
- func (g *LoadBalancer) Type() common.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
HashFunction string `yaml:"hashFunction" json:"hashFunction"`
}
Config 一致性hash配置对象
type LoadBalancer ¶
type LoadBalancer struct { *plugin.PluginBase // contains filtered or unexported fields }
LoadBalancer hash负载均衡插件
func (*LoadBalancer) ChooseInstance ¶
func (g *LoadBalancer) ChooseInstance(criteria *loadbalancer.Criteria, inputInstances model.ServiceInstances) (model.Instance, error)
ChooseInstance 获取单个服务实例
Click to show internal directories.
Click to hide internal directories.