Documentation ¶
Index ¶
- Variables
- type ExtProcOverrides
- func (*ExtProcOverrides) Descriptor() ([]byte, []int)deprecated
- func (x *ExtProcOverrides) GetAsyncMode() bool
- func (x *ExtProcOverrides) GetGrpcService() *v3.GrpcService
- func (x *ExtProcOverrides) GetProcessingMode() *ProcessingMode
- func (x *ExtProcOverrides) GetRequestAttributes() []string
- func (x *ExtProcOverrides) GetResponseAttributes() []string
- func (*ExtProcOverrides) ProtoMessage()
- func (x *ExtProcOverrides) ProtoReflect() protoreflect.Message
- func (x *ExtProcOverrides) Reset()
- func (x *ExtProcOverrides) String() string
- func (m *ExtProcOverrides) Validate() error
- func (m *ExtProcOverrides) ValidateAll() error
- type ExtProcOverridesMultiError
- type ExtProcOverridesValidationError
- func (e ExtProcOverridesValidationError) Cause() error
- func (e ExtProcOverridesValidationError) Error() string
- func (e ExtProcOverridesValidationError) ErrorName() string
- func (e ExtProcOverridesValidationError) Field() string
- func (e ExtProcOverridesValidationError) Key() bool
- func (e ExtProcOverridesValidationError) Reason() string
- type ExtProcPerRoute
- func (*ExtProcPerRoute) Descriptor() ([]byte, []int)deprecated
- func (x *ExtProcPerRoute) GetDisabled() bool
- func (m *ExtProcPerRoute) GetOverride() isExtProcPerRoute_Override
- func (x *ExtProcPerRoute) GetOverrides() *ExtProcOverrides
- func (*ExtProcPerRoute) ProtoMessage()
- func (x *ExtProcPerRoute) ProtoReflect() protoreflect.Message
- func (x *ExtProcPerRoute) Reset()
- func (x *ExtProcPerRoute) String() string
- func (m *ExtProcPerRoute) Validate() error
- func (m *ExtProcPerRoute) ValidateAll() error
- type ExtProcPerRouteMultiError
- type ExtProcPerRouteValidationError
- func (e ExtProcPerRouteValidationError) Cause() error
- func (e ExtProcPerRouteValidationError) Error() string
- func (e ExtProcPerRouteValidationError) ErrorName() string
- func (e ExtProcPerRouteValidationError) Field() string
- func (e ExtProcPerRouteValidationError) Key() bool
- func (e ExtProcPerRouteValidationError) Reason() string
- type ExtProcPerRoute_Disabled
- type ExtProcPerRoute_Overrides
- type ExternalProcessor
- func (*ExternalProcessor) Descriptor() ([]byte, []int)deprecated
- func (x *ExternalProcessor) GetAllowModeOverride() bool
- func (x *ExternalProcessor) GetAsyncMode() bool
- func (x *ExternalProcessor) GetDisableClearRouteCache() bool
- func (x *ExternalProcessor) GetFailureModeAllow() bool
- func (x *ExternalProcessor) GetFilterMetadata() *_struct.Struct
- func (x *ExternalProcessor) GetForwardRules() *HeaderForwardingRules
- func (x *ExternalProcessor) GetGrpcService() *v3.GrpcService
- func (x *ExternalProcessor) GetMaxMessageTimeout() *duration.Duration
- func (x *ExternalProcessor) GetMessageTimeout() *duration.Duration
- func (x *ExternalProcessor) GetMutationRules() *v31.HeaderMutationRules
- func (x *ExternalProcessor) GetProcessingMode() *ProcessingMode
- func (x *ExternalProcessor) GetRequestAttributes() []string
- func (x *ExternalProcessor) GetResponseAttributes() []string
- func (x *ExternalProcessor) GetStatPrefix() string
- func (*ExternalProcessor) ProtoMessage()
- func (x *ExternalProcessor) ProtoReflect() protoreflect.Message
- func (x *ExternalProcessor) Reset()
- func (x *ExternalProcessor) String() string
- func (m *ExternalProcessor) Validate() error
- func (m *ExternalProcessor) ValidateAll() error
- type ExternalProcessorMultiError
- type ExternalProcessorValidationError
- func (e ExternalProcessorValidationError) Cause() error
- func (e ExternalProcessorValidationError) Error() string
- func (e ExternalProcessorValidationError) ErrorName() string
- func (e ExternalProcessorValidationError) Field() string
- func (e ExternalProcessorValidationError) Key() bool
- func (e ExternalProcessorValidationError) Reason() string
- type HeaderForwardingRules
- func (*HeaderForwardingRules) Descriptor() ([]byte, []int)deprecated
- func (x *HeaderForwardingRules) GetAllowedHeaders() *v32.ListStringMatcher
- func (x *HeaderForwardingRules) GetDisallowedHeaders() *v32.ListStringMatcher
- func (*HeaderForwardingRules) ProtoMessage()
- func (x *HeaderForwardingRules) ProtoReflect() protoreflect.Message
- func (x *HeaderForwardingRules) Reset()
- func (x *HeaderForwardingRules) String() string
- func (m *HeaderForwardingRules) Validate() error
- func (m *HeaderForwardingRules) ValidateAll() error
- type HeaderForwardingRulesMultiError
- type HeaderForwardingRulesValidationError
- func (e HeaderForwardingRulesValidationError) Cause() error
- func (e HeaderForwardingRulesValidationError) Error() string
- func (e HeaderForwardingRulesValidationError) ErrorName() string
- func (e HeaderForwardingRulesValidationError) Field() string
- func (e HeaderForwardingRulesValidationError) Key() bool
- func (e HeaderForwardingRulesValidationError) Reason() string
- type ProcessingMode
- func (*ProcessingMode) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode
- func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode
- func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode
- func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode
- func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode
- func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode
- func (*ProcessingMode) ProtoMessage()
- func (x *ProcessingMode) ProtoReflect() protoreflect.Message
- func (x *ProcessingMode) Reset()
- func (x *ProcessingMode) String() string
- func (m *ProcessingMode) Validate() error
- func (m *ProcessingMode) ValidateAll() error
- type ProcessingModeMultiError
- type ProcessingModeValidationError
- func (e ProcessingModeValidationError) Cause() error
- func (e ProcessingModeValidationError) Error() string
- func (e ProcessingModeValidationError) ErrorName() string
- func (e ProcessingModeValidationError) Field() string
- func (e ProcessingModeValidationError) Key() bool
- func (e ProcessingModeValidationError) Reason() string
- type ProcessingMode_BodySendMode
- func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor
- func (x ProcessingMode_BodySendMode) Enum() *ProcessingMode_BodySendMode
- func (ProcessingMode_BodySendMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProcessingMode_BodySendMode) Number() protoreflect.EnumNumber
- func (x ProcessingMode_BodySendMode) String() string
- func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType
- type ProcessingMode_HeaderSendMode
- func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor
- func (x ProcessingMode_HeaderSendMode) Enum() *ProcessingMode_HeaderSendMode
- func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProcessingMode_HeaderSendMode) Number() protoreflect.EnumNumber
- func (x ProcessingMode_HeaderSendMode) String() string
- func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( ProcessingMode_HeaderSendMode_name = map[int32]string{ 0: "DEFAULT", 1: "SEND", 2: "SKIP", } ProcessingMode_HeaderSendMode_value = map[string]int32{ "DEFAULT": 0, "SEND": 1, "SKIP": 2, } )
Enum value maps for ProcessingMode_HeaderSendMode.
var ( ProcessingMode_BodySendMode_name = map[int32]string{ 0: "NONE", 1: "STREAMED", 2: "BUFFERED", 3: "BUFFERED_PARTIAL", } ProcessingMode_BodySendMode_value = map[string]int32{ "NONE": 0, "STREAMED": 1, "BUFFERED": 2, "BUFFERED_PARTIAL": 3, } )
Enum value maps for ProcessingMode_BodySendMode.
var File_envoy_extensions_filters_http_ext_proc_v3_ext_proc_proto protoreflect.FileDescriptor
var File_envoy_extensions_filters_http_ext_proc_v3_processing_mode_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ExtProcOverrides ¶
type ExtProcOverrides struct { // Set a different processing mode for this route than the default. ProcessingMode *ProcessingMode `protobuf:"bytes,1,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` // [#not-implemented-hide:] // Set a different asynchronous processing option than the default. AsyncMode bool `protobuf:"varint,2,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` // [#not-implemented-hide:] // Set different optional attributes than the default setting of the // “request_attributes“ field. RequestAttributes []string `protobuf:"bytes,3,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` // [#not-implemented-hide:] // Set different optional properties than the default setting of the // “response_attributes“ field. ResponseAttributes []string `protobuf:"bytes,4,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` // Set a different gRPC service for this route than the default. GrpcService *v3.GrpcService `protobuf:"bytes,5,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` // contains filtered or unexported fields }
Overrides that may be set on a per-route basis [#next-free-field: 6]
func (*ExtProcOverrides) Descriptor
deprecated
func (*ExtProcOverrides) Descriptor() ([]byte, []int)
Deprecated: Use ExtProcOverrides.ProtoReflect.Descriptor instead.
func (*ExtProcOverrides) GetAsyncMode ¶
func (x *ExtProcOverrides) GetAsyncMode() bool
func (*ExtProcOverrides) GetGrpcService ¶ added in v3.2.0
func (x *ExtProcOverrides) GetGrpcService() *v3.GrpcService
func (*ExtProcOverrides) GetProcessingMode ¶
func (x *ExtProcOverrides) GetProcessingMode() *ProcessingMode
func (*ExtProcOverrides) GetRequestAttributes ¶
func (x *ExtProcOverrides) GetRequestAttributes() []string
func (*ExtProcOverrides) GetResponseAttributes ¶
func (x *ExtProcOverrides) GetResponseAttributes() []string
func (*ExtProcOverrides) ProtoMessage ¶
func (*ExtProcOverrides) ProtoMessage()
func (*ExtProcOverrides) ProtoReflect ¶
func (x *ExtProcOverrides) ProtoReflect() protoreflect.Message
func (*ExtProcOverrides) Reset ¶
func (x *ExtProcOverrides) Reset()
func (*ExtProcOverrides) String ¶
func (x *ExtProcOverrides) String() string
func (*ExtProcOverrides) Validate ¶
func (m *ExtProcOverrides) Validate() error
Validate checks the field values on ExtProcOverrides 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 (*ExtProcOverrides) ValidateAll ¶
func (m *ExtProcOverrides) ValidateAll() error
ValidateAll checks the field values on ExtProcOverrides 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 ExtProcOverridesMultiError, or nil if none found.
type ExtProcOverridesMultiError ¶
type ExtProcOverridesMultiError []error
ExtProcOverridesMultiError is an error wrapping multiple validation errors returned by ExtProcOverrides.ValidateAll() if the designated constraints aren't met.
func (ExtProcOverridesMultiError) AllErrors ¶
func (m ExtProcOverridesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExtProcOverridesMultiError) Error ¶
func (m ExtProcOverridesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExtProcOverridesValidationError ¶
type ExtProcOverridesValidationError struct {
// contains filtered or unexported fields
}
ExtProcOverridesValidationError is the validation error returned by ExtProcOverrides.Validate if the designated constraints aren't met.
func (ExtProcOverridesValidationError) Cause ¶
func (e ExtProcOverridesValidationError) Cause() error
Cause function returns cause value.
func (ExtProcOverridesValidationError) Error ¶
func (e ExtProcOverridesValidationError) Error() string
Error satisfies the builtin error interface
func (ExtProcOverridesValidationError) ErrorName ¶
func (e ExtProcOverridesValidationError) ErrorName() string
ErrorName returns error name.
func (ExtProcOverridesValidationError) Field ¶
func (e ExtProcOverridesValidationError) Field() string
Field function returns field value.
func (ExtProcOverridesValidationError) Key ¶
func (e ExtProcOverridesValidationError) Key() bool
Key function returns key value.
func (ExtProcOverridesValidationError) Reason ¶
func (e ExtProcOverridesValidationError) Reason() string
Reason function returns reason value.
type ExtProcPerRoute ¶
type ExtProcPerRoute struct { // Types that are assignable to Override: // *ExtProcPerRoute_Disabled // *ExtProcPerRoute_Overrides Override isExtProcPerRoute_Override `protobuf_oneof:"override"` // contains filtered or unexported fields }
Extra settings that may be added to per-route configuration for a virtual host or cluster.
func (*ExtProcPerRoute) Descriptor
deprecated
func (*ExtProcPerRoute) Descriptor() ([]byte, []int)
Deprecated: Use ExtProcPerRoute.ProtoReflect.Descriptor instead.
func (*ExtProcPerRoute) GetDisabled ¶
func (x *ExtProcPerRoute) GetDisabled() bool
func (*ExtProcPerRoute) GetOverride ¶
func (m *ExtProcPerRoute) GetOverride() isExtProcPerRoute_Override
func (*ExtProcPerRoute) GetOverrides ¶
func (x *ExtProcPerRoute) GetOverrides() *ExtProcOverrides
func (*ExtProcPerRoute) ProtoMessage ¶
func (*ExtProcPerRoute) ProtoMessage()
func (*ExtProcPerRoute) ProtoReflect ¶
func (x *ExtProcPerRoute) ProtoReflect() protoreflect.Message
func (*ExtProcPerRoute) Reset ¶
func (x *ExtProcPerRoute) Reset()
func (*ExtProcPerRoute) String ¶
func (x *ExtProcPerRoute) String() string
func (*ExtProcPerRoute) Validate ¶
func (m *ExtProcPerRoute) Validate() error
Validate checks the field values on ExtProcPerRoute 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 (*ExtProcPerRoute) ValidateAll ¶
func (m *ExtProcPerRoute) ValidateAll() error
ValidateAll checks the field values on ExtProcPerRoute 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 ExtProcPerRouteMultiError, or nil if none found.
type ExtProcPerRouteMultiError ¶
type ExtProcPerRouteMultiError []error
ExtProcPerRouteMultiError is an error wrapping multiple validation errors returned by ExtProcPerRoute.ValidateAll() if the designated constraints aren't met.
func (ExtProcPerRouteMultiError) AllErrors ¶
func (m ExtProcPerRouteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExtProcPerRouteMultiError) Error ¶
func (m ExtProcPerRouteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExtProcPerRouteValidationError ¶
type ExtProcPerRouteValidationError struct {
// contains filtered or unexported fields
}
ExtProcPerRouteValidationError is the validation error returned by ExtProcPerRoute.Validate if the designated constraints aren't met.
func (ExtProcPerRouteValidationError) Cause ¶
func (e ExtProcPerRouteValidationError) Cause() error
Cause function returns cause value.
func (ExtProcPerRouteValidationError) Error ¶
func (e ExtProcPerRouteValidationError) Error() string
Error satisfies the builtin error interface
func (ExtProcPerRouteValidationError) ErrorName ¶
func (e ExtProcPerRouteValidationError) ErrorName() string
ErrorName returns error name.
func (ExtProcPerRouteValidationError) Field ¶
func (e ExtProcPerRouteValidationError) Field() string
Field function returns field value.
func (ExtProcPerRouteValidationError) Key ¶
func (e ExtProcPerRouteValidationError) Key() bool
Key function returns key value.
func (ExtProcPerRouteValidationError) Reason ¶
func (e ExtProcPerRouteValidationError) Reason() string
Reason function returns reason value.
type ExtProcPerRoute_Disabled ¶
type ExtProcPerRoute_Disabled struct { // Disable the filter for this particular vhost or route. // If disabled is specified in multiple per-filter-configs, the most specific one will be used. Disabled bool `protobuf:"varint,1,opt,name=disabled,proto3,oneof"` }
type ExtProcPerRoute_Overrides ¶
type ExtProcPerRoute_Overrides struct { // Override aspects of the configuration for this route. A set of // overrides in a more specific configuration will override a "disabled" // flag set in a less-specific one. Overrides *ExtProcOverrides `protobuf:"bytes,2,opt,name=overrides,proto3,oneof"` }
type ExternalProcessor ¶
type ExternalProcessor struct { // Configuration for the gRPC service that the filter will communicate with. // The filter supports both the "Envoy" and "Google" gRPC clients. GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"` // By default, if the gRPC stream cannot be established, or if it is closed // prematurely with an error, the filter will fail. Specifically, if the // response headers have not yet been delivered, then it will return a 500 // error downstream. If they have been delivered, then instead the HTTP stream to the // downstream client will be reset. // With this parameter set to true, however, then if the gRPC stream is prematurely closed // or could not be opened, processing continues without error. FailureModeAllow bool `protobuf:"varint,2,opt,name=failure_mode_allow,json=failureModeAllow,proto3" json:"failure_mode_allow,omitempty"` // Specifies default options for how HTTP headers, trailers, and bodies are // sent. See ProcessingMode for details. ProcessingMode *ProcessingMode `protobuf:"bytes,3,opt,name=processing_mode,json=processingMode,proto3" json:"processing_mode,omitempty"` // [#not-implemented-hide:] // If true, send each part of the HTTP request or response specified by ProcessingMode // asynchronously -- in other words, send the message on the gRPC stream and then continue // filter processing. If false, which is the default, suspend filter execution after // each message is sent to the remote service and wait up to "message_timeout" // for a reply. AsyncMode bool `protobuf:"varint,4,opt,name=async_mode,json=asyncMode,proto3" json:"async_mode,omitempty"` // [#not-implemented-hide:] // Envoy provides a number of :ref:`attributes <arch_overview_attributes>` // for expressive policies. Each attribute name provided in this field will be // matched against that list and populated in the request_headers message. // See the :ref:`attribute documentation <arch_overview_request_attributes>` // for the list of supported attributes and their types. RequestAttributes []string `protobuf:"bytes,5,rep,name=request_attributes,json=requestAttributes,proto3" json:"request_attributes,omitempty"` // [#not-implemented-hide:] // Envoy provides a number of :ref:`attributes <arch_overview_attributes>` // for expressive policies. Each attribute name provided in this field will be // matched against that list and populated in the response_headers message. // See the :ref:`attribute documentation <arch_overview_attributes>` // for the list of supported attributes and their types. ResponseAttributes []string `protobuf:"bytes,6,rep,name=response_attributes,json=responseAttributes,proto3" json:"response_attributes,omitempty"` // Specifies the timeout for each individual message sent on the stream and // when the filter is running in synchronous mode. Whenever the proxy sends // a message on the stream that requires a response, it will reset this timer, // and will stop processing and return an error (subject to the processing mode) // if the timer expires before a matching response is received. There is no // timeout when the filter is running in asynchronous mode. Zero is a valid // config which means the timer will be triggered immediately. If not // configured, default is 200 milliseconds. MessageTimeout *duration.Duration `protobuf:"bytes,7,opt,name=message_timeout,json=messageTimeout,proto3" json:"message_timeout,omitempty"` // Optional additional prefix to use when emitting statistics. This allows to distinguish // emitted statistics between configured *ext_proc* filters in an HTTP filter chain. StatPrefix string `protobuf:"bytes,8,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"` // Rules that determine what modifications an external processing server may // make to message headers. If not set, all headers may be modified except // for "host", ":authority", ":scheme", ":method", and headers that start // with the header prefix set via // :ref:`header_prefix <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.header_prefix>` // (which is usually "x-envoy"). // Note that changing headers such as "host" or ":authority" may not in itself // change Envoy's routing decision, as routes can be cached. To also force the // route to be recomputed, set the // :ref:`clear_route_cache <envoy_v3_api_field_service.ext_proc.v3.CommonResponse.clear_route_cache>` // field to true in the same response. MutationRules *v31.HeaderMutationRules `protobuf:"bytes,9,opt,name=mutation_rules,json=mutationRules,proto3" json:"mutation_rules,omitempty"` // Specify the upper bound of // :ref:`override_message_timeout <envoy_v3_api_field_service.ext_proc.v3.ProcessingResponse.override_message_timeout>` // If not specified, by default it is 0, which will effectively disable the “override_message_timeout“ API. MaxMessageTimeout *duration.Duration `protobuf:"bytes,10,opt,name=max_message_timeout,json=maxMessageTimeout,proto3" json:"max_message_timeout,omitempty"` // Prevents clearing the route-cache when the // :ref:`clear_route_cache <envoy_v3_api_field_service.ext_proc.v3.CommonResponse.clear_route_cache>` // field is set in an external processor response. DisableClearRouteCache bool `` /* 133-byte string literal not displayed */ // Allow headers matching the “forward_rules“ to be forwarded to the external processing server. // If not set, all headers are forwarded to the external processing server. ForwardRules *HeaderForwardingRules `protobuf:"bytes,12,opt,name=forward_rules,json=forwardRules,proto3" json:"forward_rules,omitempty"` // Additional metadata to be added to the filter state for logging purposes. The metadata // will be added to StreamInfo's filter state under the namespace corresponding to the // ext_proc filter name. FilterMetadata *_struct.Struct `protobuf:"bytes,13,opt,name=filter_metadata,json=filterMetadata,proto3" json:"filter_metadata,omitempty"` // If “allow_mode_override“ is set to true, the filter config :ref:`processing_mode // <envoy_v3_api_field_extensions.filters.http.ext_proc.v3.ExternalProcessor.processing_mode>` // can be overridden by the response message from the external processing server // :ref:`mode_override <envoy_v3_api_field_service.ext_proc.v3.ProcessingResponse.mode_override>`. // If not set, “mode_override“ API in the response message will be ignored. AllowModeOverride bool `protobuf:"varint,14,opt,name=allow_mode_override,json=allowModeOverride,proto3" json:"allow_mode_override,omitempty"` // contains filtered or unexported fields }
The filter communicates with an external gRPC service called an "external processor" that can do a variety of things with the request and response:
* Access and modify the HTTP headers on the request, response, or both * Access and modify the HTTP request and response bodies * Access and modify the dynamic stream metadata * Immediately send an HTTP response downstream and terminate other processing
The filter communicates with the server using a gRPC bidirectional stream. After the initial request, the external server is in control over what additional data is sent to it and how it should be processed.
By implementing the protocol specified by the stream, the external server can choose:
- Whether it receives the response message at all
- Whether it receives the message body at all, in separate chunks, or as a single buffer
- Whether subsequent HTTP requests are transmitted synchronously or whether they are sent asynchronously.
- To modify request or response trailers if they already exist
- To add request or response trailers where they are not present
The filter supports up to six different processing steps. Each is represented by a gRPC stream message that is sent to the external processor. For each message, the processor must send a matching response.
- Request headers: Contains the headers from the original HTTP request.
- Request body: Sent in a single message if the BUFFERED or BUFFERED_PARTIAL mode is chosen, in multiple messages if the STREAMED mode is chosen, and not at all otherwise.
- Request trailers: Delivered if they are present and if the trailer mode is set to SEND.
- Response headers: Contains the headers from the HTTP response. Keep in mind that if the upstream system sends them before processing the request body that this message may arrive before the complete body.
- Response body: Sent according to the processing mode like the request body.
- Response trailers: Delivered according to the processing mode like the request trailers.
By default, the processor sends only the request and response headers messages. This may be changed to include any of the six steps by changing the processing_mode setting of the filter configuration, or by setting the mode_override of any response from the external processor. The latter is only enabled if allow_mode_override is set to true. This way, a processor may, for example, use information in the request header to determine whether the message body must be examined, or whether the proxy should simply stream it straight through.
All of this together allows a server to process the filter traffic in fairly sophisticated ways. For example:
- A server may choose to examine all or part of the HTTP message bodies depending on the content of the headers.
- A server may choose to immediately reject some messages based on their HTTP headers (or other dynamic metadata) and more carefully examine others.
- A server may asynchronously monitor traffic coming through the filter by inspecting headers, bodies, or both, and then decide to switch to a synchronous processing mode, either permanently or temporarily.
The protocol itself is based on a bidirectional gRPC stream. Envoy will send the server :ref:`ProcessingRequest <envoy_v3_api_msg_service.ext_proc.v3.ProcessingRequest>` messages, and the server must reply with :ref:`ProcessingResponse <envoy_v3_api_msg_service.ext_proc.v3.ProcessingResponse>`.
Stats about each gRPC call are recorded in a :ref:`dynamic filter state <arch_overview_advanced_filter_state_sharing>` object in a namespace matching the filter name.
[#next-free-field: 15]
func (*ExternalProcessor) Descriptor
deprecated
func (*ExternalProcessor) Descriptor() ([]byte, []int)
Deprecated: Use ExternalProcessor.ProtoReflect.Descriptor instead.
func (*ExternalProcessor) GetAllowModeOverride ¶ added in v3.9.0
func (x *ExternalProcessor) GetAllowModeOverride() bool
func (*ExternalProcessor) GetAsyncMode ¶
func (x *ExternalProcessor) GetAsyncMode() bool
func (*ExternalProcessor) GetDisableClearRouteCache ¶ added in v3.9.0
func (x *ExternalProcessor) GetDisableClearRouteCache() bool
func (*ExternalProcessor) GetFailureModeAllow ¶
func (x *ExternalProcessor) GetFailureModeAllow() bool
func (*ExternalProcessor) GetFilterMetadata ¶ added in v3.9.0
func (x *ExternalProcessor) GetFilterMetadata() *_struct.Struct
func (*ExternalProcessor) GetForwardRules ¶ added in v3.9.0
func (x *ExternalProcessor) GetForwardRules() *HeaderForwardingRules
func (*ExternalProcessor) GetGrpcService ¶
func (x *ExternalProcessor) GetGrpcService() *v3.GrpcService
func (*ExternalProcessor) GetMaxMessageTimeout ¶ added in v3.7.0
func (x *ExternalProcessor) GetMaxMessageTimeout() *duration.Duration
func (*ExternalProcessor) GetMessageTimeout ¶
func (x *ExternalProcessor) GetMessageTimeout() *duration.Duration
func (*ExternalProcessor) GetMutationRules ¶
func (x *ExternalProcessor) GetMutationRules() *v31.HeaderMutationRules
func (*ExternalProcessor) GetProcessingMode ¶
func (x *ExternalProcessor) GetProcessingMode() *ProcessingMode
func (*ExternalProcessor) GetRequestAttributes ¶
func (x *ExternalProcessor) GetRequestAttributes() []string
func (*ExternalProcessor) GetResponseAttributes ¶
func (x *ExternalProcessor) GetResponseAttributes() []string
func (*ExternalProcessor) GetStatPrefix ¶
func (x *ExternalProcessor) GetStatPrefix() string
func (*ExternalProcessor) ProtoMessage ¶
func (*ExternalProcessor) ProtoMessage()
func (*ExternalProcessor) ProtoReflect ¶
func (x *ExternalProcessor) ProtoReflect() protoreflect.Message
func (*ExternalProcessor) Reset ¶
func (x *ExternalProcessor) Reset()
func (*ExternalProcessor) String ¶
func (x *ExternalProcessor) String() string
func (*ExternalProcessor) Validate ¶
func (m *ExternalProcessor) Validate() error
Validate checks the field values on ExternalProcessor 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 (*ExternalProcessor) ValidateAll ¶
func (m *ExternalProcessor) ValidateAll() error
ValidateAll checks the field values on ExternalProcessor 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 ExternalProcessorMultiError, or nil if none found.
type ExternalProcessorMultiError ¶
type ExternalProcessorMultiError []error
ExternalProcessorMultiError is an error wrapping multiple validation errors returned by ExternalProcessor.ValidateAll() if the designated constraints aren't met.
func (ExternalProcessorMultiError) AllErrors ¶
func (m ExternalProcessorMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ExternalProcessorMultiError) Error ¶
func (m ExternalProcessorMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ExternalProcessorValidationError ¶
type ExternalProcessorValidationError struct {
// contains filtered or unexported fields
}
ExternalProcessorValidationError is the validation error returned by ExternalProcessor.Validate if the designated constraints aren't met.
func (ExternalProcessorValidationError) Cause ¶
func (e ExternalProcessorValidationError) Cause() error
Cause function returns cause value.
func (ExternalProcessorValidationError) Error ¶
func (e ExternalProcessorValidationError) Error() string
Error satisfies the builtin error interface
func (ExternalProcessorValidationError) ErrorName ¶
func (e ExternalProcessorValidationError) ErrorName() string
ErrorName returns error name.
func (ExternalProcessorValidationError) Field ¶
func (e ExternalProcessorValidationError) Field() string
Field function returns field value.
func (ExternalProcessorValidationError) Key ¶
func (e ExternalProcessorValidationError) Key() bool
Key function returns key value.
func (ExternalProcessorValidationError) Reason ¶
func (e ExternalProcessorValidationError) Reason() string
Reason function returns reason value.
type HeaderForwardingRules ¶ added in v3.9.0
type HeaderForwardingRules struct { // If set, specifically allow any header in this list to be forwarded to the external // processing server. This can be overridden by the below “disallowed_headers“. AllowedHeaders *v32.ListStringMatcher `protobuf:"bytes,1,opt,name=allowed_headers,json=allowedHeaders,proto3" json:"allowed_headers,omitempty"` // If set, specifically disallow any header in this list to be forwarded to the external // processing server. This overrides the above “allowed_headers“ if a header matches both. DisallowedHeaders *v32.ListStringMatcher `protobuf:"bytes,2,opt,name=disallowed_headers,json=disallowedHeaders,proto3" json:"disallowed_headers,omitempty"` // contains filtered or unexported fields }
The HeaderForwardingRules structure specifies what headers are allowed to be forwarded to the external processing server.
This works as below:
- If neither “allowed_headers“ nor “disallowed_headers“ is set, all headers are forwarded.
- If both “allowed_headers“ and “disallowed_headers“ are set, only headers in the “allowed_headers“ but not in the “disallowed_headers“ are forwarded.
- If “allowed_headers“ is set, and “disallowed_headers“ is not set, only headers in the “allowed_headers“ are forwarded.
- If “disallowed_headers“ is set, and “allowed_headers“ is not set, all headers except headers in the “disallowed_headers“ are forwarded.
func (*HeaderForwardingRules) Descriptor
deprecated
added in
v3.9.0
func (*HeaderForwardingRules) Descriptor() ([]byte, []int)
Deprecated: Use HeaderForwardingRules.ProtoReflect.Descriptor instead.
func (*HeaderForwardingRules) GetAllowedHeaders ¶ added in v3.9.0
func (x *HeaderForwardingRules) GetAllowedHeaders() *v32.ListStringMatcher
func (*HeaderForwardingRules) GetDisallowedHeaders ¶ added in v3.9.0
func (x *HeaderForwardingRules) GetDisallowedHeaders() *v32.ListStringMatcher
func (*HeaderForwardingRules) ProtoMessage ¶ added in v3.9.0
func (*HeaderForwardingRules) ProtoMessage()
func (*HeaderForwardingRules) ProtoReflect ¶ added in v3.9.0
func (x *HeaderForwardingRules) ProtoReflect() protoreflect.Message
func (*HeaderForwardingRules) Reset ¶ added in v3.9.0
func (x *HeaderForwardingRules) Reset()
func (*HeaderForwardingRules) String ¶ added in v3.9.0
func (x *HeaderForwardingRules) String() string
func (*HeaderForwardingRules) Validate ¶ added in v3.9.0
func (m *HeaderForwardingRules) Validate() error
Validate checks the field values on HeaderForwardingRules 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 (*HeaderForwardingRules) ValidateAll ¶ added in v3.9.0
func (m *HeaderForwardingRules) ValidateAll() error
ValidateAll checks the field values on HeaderForwardingRules 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 HeaderForwardingRulesMultiError, or nil if none found.
type HeaderForwardingRulesMultiError ¶ added in v3.9.0
type HeaderForwardingRulesMultiError []error
HeaderForwardingRulesMultiError is an error wrapping multiple validation errors returned by HeaderForwardingRules.ValidateAll() if the designated constraints aren't met.
func (HeaderForwardingRulesMultiError) AllErrors ¶ added in v3.9.0
func (m HeaderForwardingRulesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HeaderForwardingRulesMultiError) Error ¶ added in v3.9.0
func (m HeaderForwardingRulesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HeaderForwardingRulesValidationError ¶ added in v3.9.0
type HeaderForwardingRulesValidationError struct {
// contains filtered or unexported fields
}
HeaderForwardingRulesValidationError is the validation error returned by HeaderForwardingRules.Validate if the designated constraints aren't met.
func (HeaderForwardingRulesValidationError) Cause ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) Cause() error
Cause function returns cause value.
func (HeaderForwardingRulesValidationError) Error ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) Error() string
Error satisfies the builtin error interface
func (HeaderForwardingRulesValidationError) ErrorName ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) ErrorName() string
ErrorName returns error name.
func (HeaderForwardingRulesValidationError) Field ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) Field() string
Field function returns field value.
func (HeaderForwardingRulesValidationError) Key ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) Key() bool
Key function returns key value.
func (HeaderForwardingRulesValidationError) Reason ¶ added in v3.9.0
func (e HeaderForwardingRulesValidationError) Reason() string
Reason function returns reason value.
type ProcessingMode ¶
type ProcessingMode struct { // How to handle the request header. Default is "SEND". RequestHeaderMode ProcessingMode_HeaderSendMode `` /* 192-byte string literal not displayed */ // How to handle the response header. Default is "SEND". ResponseHeaderMode ProcessingMode_HeaderSendMode `` /* 195-byte string literal not displayed */ // How to handle the request body. Default is "NONE". RequestBodyMode ProcessingMode_BodySendMode `` /* 184-byte string literal not displayed */ // How do handle the response body. Default is "NONE". ResponseBodyMode ProcessingMode_BodySendMode `` /* 187-byte string literal not displayed */ // How to handle the request trailers. Default is "SKIP". RequestTrailerMode ProcessingMode_HeaderSendMode `` /* 195-byte string literal not displayed */ // How to handle the response trailers. Default is "SKIP". ResponseTrailerMode ProcessingMode_HeaderSendMode `` /* 198-byte string literal not displayed */ // contains filtered or unexported fields }
[#next-free-field: 7]
func (*ProcessingMode) Descriptor
deprecated
func (*ProcessingMode) Descriptor() ([]byte, []int)
Deprecated: Use ProcessingMode.ProtoReflect.Descriptor instead.
func (*ProcessingMode) GetRequestBodyMode ¶
func (x *ProcessingMode) GetRequestBodyMode() ProcessingMode_BodySendMode
func (*ProcessingMode) GetRequestHeaderMode ¶
func (x *ProcessingMode) GetRequestHeaderMode() ProcessingMode_HeaderSendMode
func (*ProcessingMode) GetRequestTrailerMode ¶
func (x *ProcessingMode) GetRequestTrailerMode() ProcessingMode_HeaderSendMode
func (*ProcessingMode) GetResponseBodyMode ¶
func (x *ProcessingMode) GetResponseBodyMode() ProcessingMode_BodySendMode
func (*ProcessingMode) GetResponseHeaderMode ¶
func (x *ProcessingMode) GetResponseHeaderMode() ProcessingMode_HeaderSendMode
func (*ProcessingMode) GetResponseTrailerMode ¶
func (x *ProcessingMode) GetResponseTrailerMode() ProcessingMode_HeaderSendMode
func (*ProcessingMode) ProtoMessage ¶
func (*ProcessingMode) ProtoMessage()
func (*ProcessingMode) ProtoReflect ¶
func (x *ProcessingMode) ProtoReflect() protoreflect.Message
func (*ProcessingMode) Reset ¶
func (x *ProcessingMode) Reset()
func (*ProcessingMode) String ¶
func (x *ProcessingMode) String() string
func (*ProcessingMode) Validate ¶
func (m *ProcessingMode) Validate() error
Validate checks the field values on ProcessingMode 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 (*ProcessingMode) ValidateAll ¶
func (m *ProcessingMode) ValidateAll() error
ValidateAll checks the field values on ProcessingMode 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 ProcessingModeMultiError, or nil if none found.
type ProcessingModeMultiError ¶
type ProcessingModeMultiError []error
ProcessingModeMultiError is an error wrapping multiple validation errors returned by ProcessingMode.ValidateAll() if the designated constraints aren't met.
func (ProcessingModeMultiError) AllErrors ¶
func (m ProcessingModeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProcessingModeMultiError) Error ¶
func (m ProcessingModeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProcessingModeValidationError ¶
type ProcessingModeValidationError struct {
// contains filtered or unexported fields
}
ProcessingModeValidationError is the validation error returned by ProcessingMode.Validate if the designated constraints aren't met.
func (ProcessingModeValidationError) Cause ¶
func (e ProcessingModeValidationError) Cause() error
Cause function returns cause value.
func (ProcessingModeValidationError) Error ¶
func (e ProcessingModeValidationError) Error() string
Error satisfies the builtin error interface
func (ProcessingModeValidationError) ErrorName ¶
func (e ProcessingModeValidationError) ErrorName() string
ErrorName returns error name.
func (ProcessingModeValidationError) Field ¶
func (e ProcessingModeValidationError) Field() string
Field function returns field value.
func (ProcessingModeValidationError) Key ¶
func (e ProcessingModeValidationError) Key() bool
Key function returns key value.
func (ProcessingModeValidationError) Reason ¶
func (e ProcessingModeValidationError) Reason() string
Reason function returns reason value.
type ProcessingMode_BodySendMode ¶
type ProcessingMode_BodySendMode int32
Control how the request and response bodies are handled
const ( // Do not send the body at all. This is the default. ProcessingMode_NONE ProcessingMode_BodySendMode = 0 // Stream the body to the server in pieces as they arrive at the // proxy. ProcessingMode_STREAMED ProcessingMode_BodySendMode = 1 // Buffer the message body in memory and send the entire body at once. // If the body exceeds the configured buffer limit, then the // downstream system will receive an error. ProcessingMode_BUFFERED ProcessingMode_BodySendMode = 2 // Buffer the message body in memory and send the entire body in one // chunk. If the body exceeds the configured buffer limit, then the body contents // up to the buffer limit will be sent. ProcessingMode_BUFFERED_PARTIAL ProcessingMode_BodySendMode = 3 )
func (ProcessingMode_BodySendMode) Descriptor ¶
func (ProcessingMode_BodySendMode) Descriptor() protoreflect.EnumDescriptor
func (ProcessingMode_BodySendMode) Enum ¶
func (x ProcessingMode_BodySendMode) Enum() *ProcessingMode_BodySendMode
func (ProcessingMode_BodySendMode) EnumDescriptor
deprecated
func (ProcessingMode_BodySendMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProcessingMode_BodySendMode.Descriptor instead.
func (ProcessingMode_BodySendMode) Number ¶
func (x ProcessingMode_BodySendMode) Number() protoreflect.EnumNumber
func (ProcessingMode_BodySendMode) String ¶
func (x ProcessingMode_BodySendMode) String() string
func (ProcessingMode_BodySendMode) Type ¶
func (ProcessingMode_BodySendMode) Type() protoreflect.EnumType
type ProcessingMode_HeaderSendMode ¶
type ProcessingMode_HeaderSendMode int32
Control how headers and trailers are handled
const ( // The default HeaderSendMode depends on which part of the message is being // processed. By default, request and response headers are sent, // while trailers are skipped. ProcessingMode_DEFAULT ProcessingMode_HeaderSendMode = 0 // Send the header or trailer. ProcessingMode_SEND ProcessingMode_HeaderSendMode = 1 // Do not send the header or trailer. ProcessingMode_SKIP ProcessingMode_HeaderSendMode = 2 )
func (ProcessingMode_HeaderSendMode) Descriptor ¶
func (ProcessingMode_HeaderSendMode) Descriptor() protoreflect.EnumDescriptor
func (ProcessingMode_HeaderSendMode) Enum ¶
func (x ProcessingMode_HeaderSendMode) Enum() *ProcessingMode_HeaderSendMode
func (ProcessingMode_HeaderSendMode) EnumDescriptor
deprecated
func (ProcessingMode_HeaderSendMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProcessingMode_HeaderSendMode.Descriptor instead.
func (ProcessingMode_HeaderSendMode) Number ¶
func (x ProcessingMode_HeaderSendMode) Number() protoreflect.EnumNumber
func (ProcessingMode_HeaderSendMode) String ¶
func (x ProcessingMode_HeaderSendMode) String() string
func (ProcessingMode_HeaderSendMode) Type ¶
func (ProcessingMode_HeaderSendMode) Type() protoreflect.EnumType