lbhash

package
v1.8.0-beta21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_lbhash_lbhash_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Cookie struct {

	// required, the name of the cookie to be used to obtain the hash key
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// If specified, a cookie with the TTL will be generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.
	Ttl *duration.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// The name of the path for the cookie. If no path is specified here, no path will be set for the cookie.
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// contains filtered or unexported fields
}

Envoy supports two types of cookie affinity: - Passive: Envoy reads the cookie from the headers - Generated: Envoy uses the cookie spec to generate a cookie In either case, the cookie is incorporated in the hash key. additional notes https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-msg-route-routeaction-hashpolicy-cookie

func (*Cookie) Descriptor deprecated

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

Deprecated: Use Cookie.ProtoReflect.Descriptor instead.

func (*Cookie) Equal

func (m *Cookie) Equal(that interface{}) bool

Equal function

func (*Cookie) GetName

func (x *Cookie) GetName() string

func (*Cookie) GetPath

func (x *Cookie) GetPath() string

func (*Cookie) GetTtl

func (x *Cookie) GetTtl() *duration.Duration

func (*Cookie) Hash added in v1.2.13

func (m *Cookie) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Cookie) ProtoMessage

func (*Cookie) ProtoMessage()

func (*Cookie) ProtoReflect added in v1.6.0

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

func (*Cookie) Reset

func (x *Cookie) Reset()

func (*Cookie) String

func (x *Cookie) String() string

type HashPolicy

type HashPolicy struct {

	// Types that are assignable to KeyType:
	//	*HashPolicy_Header
	//	*HashPolicy_Cookie
	//	*HashPolicy_SourceIp
	KeyType isHashPolicy_KeyType `protobuf_oneof:"KeyType"`
	// If set, and a hash key is available after evaluating this policy, Envoy will skip the subsequent policies and
	// use the key as it is.
	// This is useful for defining "fallback" policies and limiting the time Envoy spends generating hash keys.
	Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
	// contains filtered or unexported fields
}

Specifies an element of Envoy's hashing policy for hashing load balancers

func (*HashPolicy) Descriptor deprecated

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

Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead.

func (*HashPolicy) Equal

func (m *HashPolicy) Equal(that interface{}) bool

Equal function

func (*HashPolicy) GetCookie

func (x *HashPolicy) GetCookie() *Cookie

func (*HashPolicy) GetHeader

func (x *HashPolicy) GetHeader() string

func (*HashPolicy) GetKeyType

func (m *HashPolicy) GetKeyType() isHashPolicy_KeyType

func (*HashPolicy) GetSourceIp

func (x *HashPolicy) GetSourceIp() bool

func (*HashPolicy) GetTerminal

func (x *HashPolicy) GetTerminal() bool

func (*HashPolicy) Hash added in v1.2.13

func (m *HashPolicy) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*HashPolicy) ProtoMessage

func (*HashPolicy) ProtoMessage()

func (*HashPolicy) ProtoReflect added in v1.6.0

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

func (*HashPolicy) Reset

func (x *HashPolicy) Reset()

func (*HashPolicy) String

func (x *HashPolicy) String() string
type HashPolicy_Cookie struct {
	// Use a given cookie as a component of the hashing load balancer's hash key
	Cookie *Cookie `protobuf:"bytes,2,opt,name=cookie,proto3,oneof"`
}

type HashPolicy_Header

type HashPolicy_Header struct {
	// Use a given header's value as a component of the hashing load balancer's hash key
	Header string `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}

type HashPolicy_SourceIp

type HashPolicy_SourceIp struct {
	// Use the request's source IP address as a component of the hashing load balancer's hash key
	SourceIp bool `protobuf:"varint,3,opt,name=source_ip,json=sourceIp,proto3,oneof"`
}

type RouteActionHashConfig

type RouteActionHashConfig struct {

	// The list of policies Envoy will use when generating a hash key for a hashing load balancer
	HashPolicies []*HashPolicy `protobuf:"bytes,1,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"`
	// contains filtered or unexported fields
}

Specifies the route’s hashing policy if the upstream cluster uses a hashing load balancer. https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/route/route.proto#envoy-api-msg-route-routeaction-hashpolicy

func (*RouteActionHashConfig) Descriptor deprecated

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

Deprecated: Use RouteActionHashConfig.ProtoReflect.Descriptor instead.

func (*RouteActionHashConfig) Equal

func (m *RouteActionHashConfig) Equal(that interface{}) bool

Equal function

func (*RouteActionHashConfig) GetHashPolicies

func (x *RouteActionHashConfig) GetHashPolicies() []*HashPolicy

func (*RouteActionHashConfig) Hash added in v1.2.13

func (m *RouteActionHashConfig) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*RouteActionHashConfig) ProtoMessage

func (*RouteActionHashConfig) ProtoMessage()

func (*RouteActionHashConfig) ProtoReflect added in v1.6.0

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

func (*RouteActionHashConfig) Reset

func (x *RouteActionHashConfig) Reset()

func (*RouteActionHashConfig) String

func (x *RouteActionHashConfig) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL