package maglevv3

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

Index

Variables

var File_envoy_extensions_load_balancing_policies_maglev_v3_maglev_proto protoreflect.FileDescriptor

Types

type Maglev

type Maglev struct {

	// The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee.
	// Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same
	// upstream as it was before. Increasing the table size reduces the amount of disruption.
	// The table size must be prime number limited to 5000011. If it is not specified, the default is 65537.
	TableSize *wrapperspb.UInt64Value `protobuf:"bytes,1,opt,name=table_size,json=tableSize,proto3" json:"table_size,omitempty"`
	// Common configuration for hashing-based load balancing policies.
	ConsistentHashingLbConfig *v3.ConsistentHashingLbConfig `protobuf:"bytes,2,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"`
	// Enable locality weighted load balancing for maglev lb explicitly.
	LocalityWeightedLbConfig *v3.LocalityLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,3,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3" json:"locality_weighted_lb_config,omitempty"`
	// contains filtered or unexported fields
}

This configuration allows the built-in Maglev LB policy to be configured via the LB policy extension point. See the :ref:`load balancing architecture overview <arch_overview_load_balancing_types>` and :ref:`Maglev<arch_overview_load_balancing_types_maglev>` for more information.

func (*Maglev) Descriptor

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

Deprecated: Use Maglev.ProtoReflect.Descriptor instead.

func (*Maglev) GetConsistentHashingLbConfig

func (x *Maglev) GetConsistentHashingLbConfig() *v3.ConsistentHashingLbConfig

func (*Maglev) GetLocalityWeightedLbConfig

func (x *Maglev) GetLocalityWeightedLbConfig() *v3.LocalityLbConfig_LocalityWeightedLbConfig

func (*Maglev) GetTableSize

func (x *Maglev) GetTableSize() *wrapperspb.UInt64Value

func (*Maglev) ProtoMessage

func (*Maglev) ProtoMessage()

func (*Maglev) ProtoReflect

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

func (*Maglev) Reset

func (x *Maglev) Reset()

func (*Maglev) String

func (x *Maglev) String() string

func (*Maglev) Validate

func (m *Maglev) Validate() error

Validate checks the field values on Maglev 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 (*Maglev) ValidateAll

func (m *Maglev) ValidateAll() error

ValidateAll checks the field values on Maglev 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 MaglevMultiError, or nil if none found.

type MaglevMultiError

type MaglevMultiError []error

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

func (MaglevMultiError) AllErrors

func (m MaglevMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MaglevMultiError) Error

func (m MaglevMultiError) Error() string

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

type MaglevValidationError

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

MaglevValidationError is the validation error returned by Maglev.Validate if the designated constraints aren't met.

func (MaglevValidationError) Cause

func (e MaglevValidationError) Cause() error

Cause function returns cause value.

func (MaglevValidationError) Error

func (e MaglevValidationError) Error() string

Error satisfies the builtin error interface

func (MaglevValidationError) ErrorName

func (e MaglevValidationError) ErrorName() string

ErrorName returns error name.

func (MaglevValidationError) Field

func (e MaglevValidationError) Field() string

Field function returns field value.

func (MaglevValidationError) Key

func (e MaglevValidationError) Key() bool

Key function returns key value.

func (MaglevValidationError) Reason

func (e MaglevValidationError) Reason() string

Reason function returns reason value.

Source Files

maglev.pb.go maglev.pb.validate.go

Version
v1.32.4 (latest)
Published
Feb 3, 2025
Platform
linux/amd64
Imports
20 packages
Last checked
1 day ago

Tools for package owners.