package weightedtarget
import "google.golang.org/grpc/balancer/weightedtarget"
Package weightedtarget implements the weighted_target balancer.
All APIs in this package are experimental.
Index ¶
Constants ¶
const Name = "weighted_target_experimental"
Name is the name of the weighted_target balancer.
Variables ¶
NewRandomWRR is the WRR constructor used to pick sub-pickers from sub-balancers. It's to be modified in tests.
Types ¶
type LBConfig ¶
type LBConfig struct { serviceconfig.LoadBalancingConfig `json:"-"` Targets map[string]Target `json:"targets,omitempty"` }
LBConfig is the balancer config for weighted_target.
type Target ¶
type Target struct { // Weight is the weight of the child policy. Weight uint32 `json:"weight,omitempty"` // ChildPolicy is the child policy and it's config. ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"` }
Target represents one target with the weight and the child policy.
Source Files ¶
logging.go weightedtarget.go weightedtarget_config.go
Directories ¶
Path | Synopsis |
---|---|
balancer/weightedtarget/weightedaggregator | Package weightedaggregator implements state aggregator for weighted_target balancer. |
- Version
- v1.62.1
- Published
- Mar 5, 2024
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 49 minutes ago –
Tools for package owners.