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 manages load balancing over a set of connections with filtering capabilities.
type Builder ¶
type Builder struct {
Filter loadbalance.Filter // Filter is to apply during the balancing process
}
Builder constructs a Balancer with a provided filter.
type WeightBalancer ¶
type WeightBalancer struct {
// contains filtered or unexported fields
}
WeightBalancer is a custom gRPC load balancer implementing the balancer.Picker interface, which uses weighted round-robin balancing strategy
func (*WeightBalancer) Pick ¶
func (w *WeightBalancer) Pick(info balancer.PickInfo) (balancer.PickResult, error)
Pick selects an appropriate connection using the provided balancer.PickInfo.
type WeightBalancerBuilder ¶
type WeightBalancerBuilder struct {
Filter loadbalance.Filter
}
WeightBalancerBuilder is a utility to build the WeightBalancer with a given Filter.
func (*WeightBalancerBuilder) Build ¶
func (w *WeightBalancerBuilder) Build(info base.PickerBuildInfo) balancer.Picker
Build creates a WeightBalancer instance.
Click to show internal directories.
Click to hide internal directories.