Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadBalance ¶
type LoadBalance interface {
SelectService(service []*common.ServiceInstance) (*common.ServiceInstance, error)
}
负载均衡器
type RandomLoadBalance ¶
type RandomLoadBalance struct { }
func (*RandomLoadBalance) SelectService ¶
func (loadBalance *RandomLoadBalance) SelectService(services []*common.ServiceInstance) (*common.ServiceInstance, error)
随机负载均衡
type WeightRoundRobinLoadBalance ¶
type WeightRoundRobinLoadBalance struct { }
func (*WeightRoundRobinLoadBalance) SelectService ¶
func (loadBalance *WeightRoundRobinLoadBalance) SelectService(services []*common.ServiceInstance) (best *common.ServiceInstance, err error)
权重平滑负载均衡
Click to show internal directories.
Click to hide internal directories.