Documentation ¶
Index ¶
- Variables
- type HeaderBasedSessionState
- func (*HeaderBasedSessionState) Descriptor() ([]byte, []int)deprecated
- func (x *HeaderBasedSessionState) GetName() string
- func (*HeaderBasedSessionState) ProtoMessage()
- func (x *HeaderBasedSessionState) ProtoReflect() protoreflect.Message
- func (x *HeaderBasedSessionState) Reset()
- func (x *HeaderBasedSessionState) String() string
- func (m *HeaderBasedSessionState) Validate() error
- func (m *HeaderBasedSessionState) ValidateAll() error
- type HeaderBasedSessionStateMultiError
- type HeaderBasedSessionStateValidationError
- func (e HeaderBasedSessionStateValidationError) Cause() error
- func (e HeaderBasedSessionStateValidationError) Error() string
- func (e HeaderBasedSessionStateValidationError) ErrorName() string
- func (e HeaderBasedSessionStateValidationError) Field() string
- func (e HeaderBasedSessionStateValidationError) Key() bool
- func (e HeaderBasedSessionStateValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_http_stateful_session_header_v3_header_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type HeaderBasedSessionState ¶
type HeaderBasedSessionState struct { // The name that will be used to obtain header value from downstream HTTP request or generate // new header for downstream. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
This extension allows the session state to be tracked via request headers.
This extension encodes the address of the upstream host selected by the load balancer into a response header with the :ref:`header configuration <envoy_v3_api_msg_extensions.http.stateful_session.header.v3.HeaderBasedSessionState>`. When new requests are incoming, this extension will try to parse the specific upstream host address by header name. If the address parsed from the header corresponds to a valid upstream host, this upstream host will be selected first. See :ref:`stateful session filter <envoy_v3_api_msg_extensions.filters.http.stateful_session.v3.StatefulSession>`.
For example, if the header name is set to “session-header“, envoy will prefer “1.2.3.4:80“ as the upstream host when the request contains the following header:
.. code-block:: none
session-header: "MS4yLjMuNDo4MA=="
When processing the upstream response, if “1.2.3.4:80“ is indeed the final choice the extension does nothing. If “1.2.3.4:80“ is not the final choice, the new selected host will be set to response headers (via the “session-header“ response header).
[#extension: envoy.http.stateful_session.header]
func (*HeaderBasedSessionState) Descriptor
deprecated
func (*HeaderBasedSessionState) Descriptor() ([]byte, []int)
Deprecated: Use HeaderBasedSessionState.ProtoReflect.Descriptor instead.
func (*HeaderBasedSessionState) GetName ¶
func (x *HeaderBasedSessionState) GetName() string
func (*HeaderBasedSessionState) ProtoMessage ¶
func (*HeaderBasedSessionState) ProtoMessage()
func (*HeaderBasedSessionState) ProtoReflect ¶
func (x *HeaderBasedSessionState) ProtoReflect() protoreflect.Message
func (*HeaderBasedSessionState) Reset ¶
func (x *HeaderBasedSessionState) Reset()
func (*HeaderBasedSessionState) String ¶
func (x *HeaderBasedSessionState) String() string
func (*HeaderBasedSessionState) Validate ¶
func (m *HeaderBasedSessionState) Validate() error
Validate checks the field values on HeaderBasedSessionState 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 (*HeaderBasedSessionState) ValidateAll ¶
func (m *HeaderBasedSessionState) ValidateAll() error
ValidateAll checks the field values on HeaderBasedSessionState 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 HeaderBasedSessionStateMultiError, or nil if none found.
type HeaderBasedSessionStateMultiError ¶
type HeaderBasedSessionStateMultiError []error
HeaderBasedSessionStateMultiError is an error wrapping multiple validation errors returned by HeaderBasedSessionState.ValidateAll() if the designated constraints aren't met.
func (HeaderBasedSessionStateMultiError) AllErrors ¶
func (m HeaderBasedSessionStateMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HeaderBasedSessionStateMultiError) Error ¶
func (m HeaderBasedSessionStateMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HeaderBasedSessionStateValidationError ¶
type HeaderBasedSessionStateValidationError struct {
// contains filtered or unexported fields
}
HeaderBasedSessionStateValidationError is the validation error returned by HeaderBasedSessionState.Validate if the designated constraints aren't met.
func (HeaderBasedSessionStateValidationError) Cause ¶
func (e HeaderBasedSessionStateValidationError) Cause() error
Cause function returns cause value.
func (HeaderBasedSessionStateValidationError) Error ¶
func (e HeaderBasedSessionStateValidationError) Error() string
Error satisfies the builtin error interface
func (HeaderBasedSessionStateValidationError) ErrorName ¶
func (e HeaderBasedSessionStateValidationError) ErrorName() string
ErrorName returns error name.
func (HeaderBasedSessionStateValidationError) Field ¶
func (e HeaderBasedSessionStateValidationError) Field() string
Field function returns field value.
func (HeaderBasedSessionStateValidationError) Key ¶
func (e HeaderBasedSessionStateValidationError) Key() bool
Key function returns key value.
func (HeaderBasedSessionStateValidationError) Reason ¶
func (e HeaderBasedSessionStateValidationError) Reason() string
Reason function returns reason value.