package clusterimpl

import "google.golang.org/grpc/xds/internal/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

const (
	// Name is the name of the cluster_impl balancer.
	Name = "xds_cluster_impl_experimental"
)

Variables

var NewRandomWRR = wrr.NewRandom

NewRandomWRR is used when calculating drops. It's exported so that tests can override it.

Types

type DropConfig

type DropConfig struct {
	Category           string
	RequestsPerMillion uint32
}

DropConfig contains the category, and drop ratio.

type LBConfig

type LBConfig struct {
	serviceconfig.LoadBalancingConfig `json:"-"`

	Cluster                 string                                `json:"cluster,omitempty"`
	EDSServiceName          string                                `json:"edsServiceName,omitempty"`
	LoadReportingServerName *string                               `json:"lrsLoadReportingServerName,omitempty"`
	MaxConcurrentRequests   *uint32                               `json:"maxConcurrentRequests,omitempty"`
	DropCategories          []DropConfig                          `json:"dropCategories,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

Version
v1.43.0
Published
Dec 14, 2021
Platform
linux/amd64
Imports
23 packages
Last checked
2 hours ago

Tools for package owners.