Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoInstances = errors.New("service instances are not existed")
Functions ¶
This section is empty.
Types ¶
type LoadBalance ¶
type LoadBalance interface {
SelectService(service []*api.AgentService) (*api.AgentService, error)
}
负载均衡器
type RandomLoadBalance ¶
type RandomLoadBalance struct { }
func (*RandomLoadBalance) SelectService ¶
func (loadBalance *RandomLoadBalance) SelectService(services []*api.AgentService) (*api.AgentService, error)
随机负载均衡
type WeightRoundRobinLoadBalance ¶
type WeightRoundRobinLoadBalance struct { }
Click to show internal directories.
Click to hide internal directories.