package random_subsettingv3
import "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/random_subsetting/v3"
Index ¶
- Variables
- type RandomSubsetting
- func (*RandomSubsetting) Descriptor() ([]byte, []int)
- func (x *RandomSubsetting) GetChildPolicy() *v3.LoadBalancingPolicy
- func (x *RandomSubsetting) GetSubsetSize() *wrapperspb.UInt32Value
- func (*RandomSubsetting) ProtoMessage()
- func (x *RandomSubsetting) ProtoReflect() protoreflect.Message
- func (x *RandomSubsetting) Reset()
- func (x *RandomSubsetting) String() string
- func (m *RandomSubsetting) Validate() error
- func (m *RandomSubsetting) ValidateAll() error
- type RandomSubsettingMultiError
- func (m RandomSubsettingMultiError) AllErrors() []error
- func (m RandomSubsettingMultiError) Error() string
- type RandomSubsettingValidationError
- func (e RandomSubsettingValidationError) Cause() error
- func (e RandomSubsettingValidationError) Error() string
- func (e RandomSubsettingValidationError) ErrorName() string
- func (e RandomSubsettingValidationError) Field() string
- func (e RandomSubsettingValidationError) Key() bool
- func (e RandomSubsettingValidationError) Reason() string
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 ¶
func (m RandomSubsettingMultiError) Error() string
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 ¶
func (e RandomSubsettingValidationError) Cause() error
Cause function returns cause value.
func (RandomSubsettingValidationError) Error ¶
func (e RandomSubsettingValidationError) Error() string
Error satisfies the builtin error interface
func (RandomSubsettingValidationError) ErrorName ¶
func (e RandomSubsettingValidationError) ErrorName() string
ErrorName returns error name.
func (RandomSubsettingValidationError) Field ¶
func (e RandomSubsettingValidationError) Field() string
Field function returns field value.
func (RandomSubsettingValidationError) Key ¶
func (e RandomSubsettingValidationError) Key() bool
Key function returns key value.
func (RandomSubsettingValidationError) Reason ¶
func (e RandomSubsettingValidationError) Reason() string
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.