package random_subsettingv3

import "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/random_subsetting/v3"

Index

Variables

var File_envoy_extensions_load_balancing_policies_random_subsetting_v3_random_subsetting_proto protoreflect.FileDescriptor

Types

type RandomSubsetting

type RandomSubsetting struct {

	// subset_size indicates how many backends every client will be connected to.
	// The value must be greater than 0.
	SubsetSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=subset_size,json=subsetSize,proto3" json:"subset_size,omitempty"`
	// The config for the child policy.
	// The value is required.
	ChildPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,2,opt,name=child_policy,json=childPolicy,proto3" json:"child_policy,omitempty"`
	// contains filtered or unexported fields
}

Configuration for the Random Subsetting Load Balancing Policy

This policy selects a subset of endpoints and passes them to the child LB policy. It maintains 2 important properties: 1. The policy tries to distribute connections among servers as equally as possible. The higher “(N_clients*subset_size)/N_servers“ ratio is, the closer the resulting server connection distribution is to uniform. 2. The policy minimizes the amount of connection churn generated during server scale-ups by using rendezvous hashing

See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.

[#not-implemented-hide:]

func (*RandomSubsetting) Descriptor

func (*RandomSubsetting) Descriptor() ([]byte, []int)

Deprecated: Use RandomSubsetting.ProtoReflect.Descriptor instead.

func (*RandomSubsetting) GetChildPolicy

func (x *RandomSubsetting) GetChildPolicy() *v3.LoadBalancingPolicy

func (*RandomSubsetting) GetSubsetSize

func (x *RandomSubsetting) GetSubsetSize() *wrapperspb.UInt32Value

func (*RandomSubsetting) ProtoMessage

func (*RandomSubsetting) ProtoMessage()

func (*RandomSubsetting) ProtoReflect

func (x *RandomSubsetting) ProtoReflect() protoreflect.Message

func (*RandomSubsetting) Reset

func (x *RandomSubsetting) Reset()

func (*RandomSubsetting) String

func (x *RandomSubsetting) String() string

func (*RandomSubsetting) Validate

func (m *RandomSubsetting) Validate() error

Validate checks the field values on RandomSubsetting with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*RandomSubsetting) ValidateAll

func (m *RandomSubsetting) ValidateAll() error

ValidateAll checks the field values on RandomSubsetting with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in RandomSubsettingMultiError, or nil if none found.

type RandomSubsettingMultiError

type RandomSubsettingMultiError []error

RandomSubsettingMultiError is an error wrapping multiple validation errors returned by RandomSubsetting.ValidateAll() if the designated constraints aren't met.

func (RandomSubsettingMultiError) AllErrors

func (m RandomSubsettingMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RandomSubsettingMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type RandomSubsettingValidationError

type RandomSubsettingValidationError struct {
	// contains filtered or unexported fields
}

RandomSubsettingValidationError is the validation error returned by RandomSubsetting.Validate if the designated constraints aren't met.

func (RandomSubsettingValidationError) Cause

Cause function returns cause value.

func (RandomSubsettingValidationError) Error

Error satisfies the builtin error interface

func (RandomSubsettingValidationError) ErrorName

ErrorName returns error name.

func (RandomSubsettingValidationError) Field

Field function returns field value.

func (RandomSubsettingValidationError) Key

Key function returns key value.

func (RandomSubsettingValidationError) Reason

Reason function returns reason value.

Source Files

random_subsetting.pb.go random_subsetting.pb.validate.go

Version
v1.37.0 (latest)
Published
Jan 13, 2026
Platform
linux/amd64
Imports
21 packages
Last checked
1 hour ago

Tools for package owners.