Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Balancer ¶
type Balancer struct {
// contains filtered or unexported fields
}
Balancer is a custom load balancer that applies filtering to available connections.
type BalancerBuilder ¶
type BalancerBuilder struct {
Filter loadbalance.Filter // Filter logic to be used by the Balancer instances created by this builder.
}
BalancerBuilder is a factory that creates instances of the Balancer.
func (*BalancerBuilder) Build ¶
func (b *BalancerBuilder) Build(info base.PickerBuildInfo) balancer.Picker
Build constructs a new Balancer from the information provided.
type WeightBalancer ¶
type WeightBalancer struct {
// contains filtered or unexported fields
}
WeightBalancer is a load balancer that considers the weight of each connection.
func (*WeightBalancer) Pick ¶
func (b *WeightBalancer) Pick(info balancer.PickInfo) (balancer.PickResult, error)
Pick selects a sub-connection based on its weight.
type WeightBalancerBuilder ¶
type WeightBalancerBuilder struct {
Filter loadbalance.Filter
}
WeightBalancerBuilder builds a WeightBalancer.
func (*WeightBalancerBuilder) Build ¶
func (b *WeightBalancerBuilder) Build(info base.PickerBuildInfo) balancer.Picker
Build constructs a new WeightBalancer from PickerBuildInfo.
Click to show internal directories.
Click to hide internal directories.