package clusterimpl
import "google.golang.org/grpc/internal/xds/balancer/clusterimpl"
Package clusterimpl implements the xds_cluster_impl balancing policy. It handles the cluster features (e.g. circuit_breaking, RPC dropping).
Note that it doesn't handle name resolution, which is done by policy xds_cluster_resolver.
Index ¶
- Constants
- Variables
- func AutoHostRewriteEnabledForTesting(ctx context.Context) bool
- func EnableAutoHostRewrite(ctx context.Context) context.Context
- type DropConfig
- type LBConfig
Constants ¶
const ( // Name is the name of the cluster_impl balancer. Name = "xds_cluster_impl_experimental" )
Variables ¶
NewRandomWRR is used when calculating drops. It's exported so that tests can override it.
Functions ¶
func AutoHostRewriteEnabledForTesting ¶
AutoHostRewriteEnabledForTesting returns the value of autoHostRewrite field; to be used for testing only.
func EnableAutoHostRewrite ¶
EnableAutoHostRewrite adds the autoHostRewrite value to the context for the xds_cluster_impl LB policy to pick.
Types ¶
type DropConfig ¶
DropConfig contains the category, and drop ratio.
type LBConfig ¶
type LBConfig struct {
serviceconfig.LoadBalancingConfig `json:"-"`
Cluster string `json:"cluster,omitempty"`
ChildPolicy *internalserviceconfig.BalancerConfig `json:"childPolicy,omitempty"`
}
LBConfig is the balancer config for cluster_impl balancer.
Source Files ¶
clusterimpl.go config.go logging.go picker.go
Directories ¶
| Path | Synopsis |
|---|---|
| internal/xds/balancer/clusterimpl/internal | Package internal contains code internal to the clusterimpl package. |
| internal/xds/balancer/clusterimpl/tests |
- Version
- v1.82.0-dev
- Published
- Apr 15, 2026
- Platform
- js/wasm
- Imports
- 37 packages
- Last checked
- 37 minutes ago –
Tools for package owners.