Documentation ¶
Index ¶
- Variables
- type Field
- type FieldSelector
- func (*FieldSelector) Descriptor() ([]byte, []int)deprecated
- func (x *FieldSelector) GetChild() *FieldSelector
- func (x *FieldSelector) GetId() int32
- func (x *FieldSelector) GetName() string
- func (*FieldSelector) ProtoMessage()
- func (x *FieldSelector) ProtoReflect() protoreflect.Message
- func (x *FieldSelector) Reset()
- func (x *FieldSelector) String() string
- type KeyValuePair
- func (*KeyValuePair) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValuePair) GetKey() string
- func (x *KeyValuePair) GetMetadataNamespace() string
- func (x *KeyValuePair) GetValue() *structpb.Value
- func (*KeyValuePair) ProtoMessage()
- func (x *KeyValuePair) ProtoReflect() protoreflect.Message
- func (x *KeyValuePair) Reset()
- func (x *KeyValuePair) String() string
- type Rule
- func (*Rule) Descriptor() ([]byte, []int)deprecated
- func (x *Rule) GetField() Field
- func (x *Rule) GetFieldSelector() *FieldSelector
- func (x *Rule) GetMethodName() string
- func (x *Rule) GetOnMissing() *KeyValuePair
- func (x *Rule) GetOnPresent() *KeyValuePair
- func (*Rule) ProtoMessage()
- func (x *Rule) ProtoReflect() protoreflect.Message
- func (x *Rule) Reset()
- func (x *Rule) String() string
- type ThriftToMetadata
- func (*ThriftToMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *ThriftToMetadata) GetAllowContentTypes() []string
- func (x *ThriftToMetadata) GetAllowEmptyContentType() bool
- func (x *ThriftToMetadata) GetProtocol() v3.ProtocolType
- func (x *ThriftToMetadata) GetRequestRules() []*Rule
- func (x *ThriftToMetadata) GetResponseRules() []*Rule
- func (x *ThriftToMetadata) GetTransport() v3.TransportType
- func (*ThriftToMetadata) ProtoMessage()
- func (x *ThriftToMetadata) ProtoReflect() protoreflect.Message
- func (x *ThriftToMetadata) Reset()
- func (x *ThriftToMetadata) String() string
- type ThriftToMetadataPerRoute
- func (*ThriftToMetadataPerRoute) Descriptor() ([]byte, []int)deprecated
- func (x *ThriftToMetadataPerRoute) GetRequestRules() []*Rule
- func (x *ThriftToMetadataPerRoute) GetResponseRules() []*Rule
- func (*ThriftToMetadataPerRoute) ProtoMessage()
- func (x *ThriftToMetadataPerRoute) ProtoReflect() protoreflect.Message
- func (x *ThriftToMetadataPerRoute) Reset()
- func (x *ThriftToMetadataPerRoute) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Field_name = map[int32]string{ 0: "METHOD_NAME", 1: "PROTOCOL", 2: "TRANSPORT", 3: "HEADER_FLAGS", 4: "SEQUENCE_ID", 5: "MESSAGE_TYPE", 6: "REPLY_TYPE", } Field_value = map[string]int32{ "METHOD_NAME": 0, "PROTOCOL": 1, "TRANSPORT": 2, "HEADER_FLAGS": 3, "SEQUENCE_ID": 4, "MESSAGE_TYPE": 5, "REPLY_TYPE": 6, } )
Enum value maps for Field.
View Source
var File_envoy_extensions_filters_http_thrift_to_metadata_v3_thrift_to_metadata_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field int32
const ( // The Thrift method name, string value. Field_METHOD_NAME Field = 0 // The Thrift protocol name, string value. Values are "binary", "binary/non-strict", and "compact", with "(auto)" suffix if // :ref:`protocol <envoy_v3_api_field_extensions.filters.http.thrift_to_metadata.v3.ThriftToMetadata.protocol>` // is set to :ref:`AUTO_PROTOCOL<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.ProtocolType.AUTO_PROTOCOL>` Field_PROTOCOL Field = 1 // The Thrift transport name, string value. Values are "framed", "header", and "unframed", with "(auto)" suffix if // :ref:`transport <envoy_v3_api_field_extensions.filters.http.thrift_to_metadata.v3.ThriftToMetadata.transport>` // is set to :ref:`AUTO_TRANSPORT<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.TransportType.AUTO_TRANSPORT>` Field_TRANSPORT Field = 2 // The Thrift message type, singed 16-bit integer value. Field_HEADER_FLAGS Field = 3 // The Thrift sequence ID, singed 32-bit integer value. Field_SEQUENCE_ID Field = 4 // The Thrift message type, string value. Values in request are "call" and "oneway", and in response are "reply" and "exception". Field_MESSAGE_TYPE Field = 5 // The Thrift reply type, string value. This is only valid for response rules. Values are "success" and "error". Field_REPLY_TYPE Field = 6 )
func (Field) Descriptor ¶
func (Field) Descriptor() protoreflect.EnumDescriptor
func (Field) Number ¶
func (x Field) Number() protoreflect.EnumNumber
func (Field) Type ¶
func (Field) Type() protoreflect.EnumType
type FieldSelector ¶
type FieldSelector struct { // field name to log Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // field id to match Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` // next node of the field selector Child *FieldSelector `protobuf:"bytes,3,opt,name=child,proto3" json:"child,omitempty"` // contains filtered or unexported fields }
func (*FieldSelector) Descriptor
deprecated
func (*FieldSelector) Descriptor() ([]byte, []int)
Deprecated: Use FieldSelector.ProtoReflect.Descriptor instead.
func (*FieldSelector) GetChild ¶
func (x *FieldSelector) GetChild() *FieldSelector
func (*FieldSelector) GetId ¶
func (x *FieldSelector) GetId() int32
func (*FieldSelector) GetName ¶
func (x *FieldSelector) GetName() string
func (*FieldSelector) ProtoMessage ¶
func (*FieldSelector) ProtoMessage()
func (*FieldSelector) ProtoReflect ¶
func (x *FieldSelector) ProtoReflect() protoreflect.Message
func (*FieldSelector) Reset ¶
func (x *FieldSelector) Reset()
func (*FieldSelector) String ¶
func (x *FieldSelector) String() string
type KeyValuePair ¶
type KeyValuePair struct { // The namespace — if this is empty, the filter's namespace will be used. MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"` // The key to use within the namespace. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // When used for on_present case, if value is non-empty it'll be used instead // of the field value. // // When used for on_missing case, a non-empty value must be provided. Value *structpb.Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*KeyValuePair) Descriptor
deprecated
func (*KeyValuePair) Descriptor() ([]byte, []int)
Deprecated: Use KeyValuePair.ProtoReflect.Descriptor instead.
func (*KeyValuePair) GetKey ¶
func (x *KeyValuePair) GetKey() string
func (*KeyValuePair) GetMetadataNamespace ¶
func (x *KeyValuePair) GetMetadataNamespace() string
func (*KeyValuePair) GetValue ¶
func (x *KeyValuePair) GetValue() *structpb.Value
func (*KeyValuePair) ProtoMessage ¶
func (*KeyValuePair) ProtoMessage()
func (*KeyValuePair) ProtoReflect ¶
func (x *KeyValuePair) ProtoReflect() protoreflect.Message
func (*KeyValuePair) Reset ¶
func (x *KeyValuePair) Reset()
func (*KeyValuePair) String ¶
func (x *KeyValuePair) String() string
type Rule ¶
type Rule struct { // The field to match on. If set, takes precedence over field_selector. Field Field `` /* 127-byte string literal not displayed */ // Specifies that a match will be performed on the value of a field in the thrift body. // If set, the whole http body will be buffered to extract the field value, which // may have performance implications. // // It's a thrift over http version of // :ref:`field_selector<envoy_v3_api_field_extensions.filters.network.thrift_proxy.filters.payload_to_metadata.v3.PayloadToMetadata.Rule.field_selector>`. // // See also `payload-to-metadata <https://www.envoyproxy.io/docs/envoy/latest/configuration/other_protocols/thrift_filters/payload_to_metadata_filter>`_ // for more reference. // // Example: // // .. code-block:: yaml // // method_name: foo // field_selector: // name: info // id: 2 // child: // name: version // id: 1 // // The above yaml will match on value of “info.version“ in the below thrift schema as input of // :ref:`on_present<envoy_v3_api_field_extensions.filters.http.thrift_to_metadata.v3.Rule.on_present>` or // :ref:`on_missing<envoy_v3_api_field_extensions.filters.http.thrift_to_metadata.v3.Rule.on_missing>` // while we are processing “foo“ method. This rule won't be applied to “bar“ method. // // .. code-block:: thrift // // struct Info { // 1: required string version; // } // service Server { // bool foo(1: i32 id, 2: Info info); // bool bar(1: i32 id, 2: Info info); // } FieldSelector *FieldSelector `protobuf:"bytes,2,opt,name=field_selector,json=fieldSelector,proto3" json:"field_selector,omitempty"` // If specified, :ref:`field_selector<envoy_v3_api_field_extensions.filters.http.thrift_to_metadata.v3.Rule.field_selector>` // will be used to extract the field value *only* on the thrift message with method name. MethodName string `protobuf:"bytes,3,opt,name=method_name,json=methodName,proto3" json:"method_name,omitempty"` // The key-value pair to set in the *filter metadata* if the field is present // in *thrift metadata*. // // If the value in the KeyValuePair is non-empty, it'll be used instead // of field value. OnPresent *KeyValuePair `protobuf:"bytes,4,opt,name=on_present,json=onPresent,proto3" json:"on_present,omitempty"` // The key-value pair to set in the *filter metadata* if the field is missing // in *thrift metadata*. // // The value in the KeyValuePair must be set, since it'll be used in lieu // of the missing field value. OnMissing *KeyValuePair `protobuf:"bytes,5,opt,name=on_missing,json=onMissing,proto3" json:"on_missing,omitempty"` // contains filtered or unexported fields }
[#next-free-field: 6]
func (*Rule) GetFieldSelector ¶
func (x *Rule) GetFieldSelector() *FieldSelector
func (*Rule) GetOnMissing ¶
func (x *Rule) GetOnMissing() *KeyValuePair
func (*Rule) GetOnPresent ¶
func (x *Rule) GetOnPresent() *KeyValuePair
func (*Rule) ProtoReflect ¶
func (x *Rule) ProtoReflect() protoreflect.Message
type ThriftToMetadata ¶
type ThriftToMetadata struct { // The list of rules to apply to http request body to extract thrift metadata. RequestRules []*Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` // The list of rules to apply to http response body to extract thrift metadata. ResponseRules []*Rule `protobuf:"bytes,2,rep,name=response_rules,json=responseRules,proto3" json:"response_rules,omitempty"` // Supplies the type of transport that the Thrift proxy should use. Defaults to // :ref:`AUTO_TRANSPORT<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.TransportType.AUTO_TRANSPORT>`. Transport v3.TransportType `` /* 140-byte string literal not displayed */ // Supplies the type of protocol that the Thrift proxy should use. Defaults to // :ref:`AUTO_PROTOCOL<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.ProtocolType.AUTO_PROTOCOL>`. // Note that :ref:`TWITTER<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.ProtocolType.TWITTER>` is // not supported due to deprecation in envoy. Protocol v3.ProtocolType `` /* 137-byte string literal not displayed */ // Allowed content-type for thrift payload to filter metadata transformation. // Default to “{"application/x-thrift"}“. // // Set “allow_empty_content_type“ if empty/missing content-type header // is allowed. AllowContentTypes []string `protobuf:"bytes,5,rep,name=allow_content_types,json=allowContentTypes,proto3" json:"allow_content_types,omitempty"` // Allowed empty content-type for thrift payload to filter metadata transformation. // Default to false. AllowEmptyContentType bool `` /* 129-byte string literal not displayed */ // contains filtered or unexported fields }
The configuration for transforming thrift metadata into filter metadata.
[#next-free-field: 7]
func (*ThriftToMetadata) Descriptor
deprecated
func (*ThriftToMetadata) Descriptor() ([]byte, []int)
Deprecated: Use ThriftToMetadata.ProtoReflect.Descriptor instead.
func (*ThriftToMetadata) GetAllowContentTypes ¶
func (x *ThriftToMetadata) GetAllowContentTypes() []string
func (*ThriftToMetadata) GetAllowEmptyContentType ¶
func (x *ThriftToMetadata) GetAllowEmptyContentType() bool
func (*ThriftToMetadata) GetProtocol ¶
func (x *ThriftToMetadata) GetProtocol() v3.ProtocolType
func (*ThriftToMetadata) GetRequestRules ¶
func (x *ThriftToMetadata) GetRequestRules() []*Rule
func (*ThriftToMetadata) GetResponseRules ¶
func (x *ThriftToMetadata) GetResponseRules() []*Rule
func (*ThriftToMetadata) GetTransport ¶
func (x *ThriftToMetadata) GetTransport() v3.TransportType
func (*ThriftToMetadata) ProtoMessage ¶
func (*ThriftToMetadata) ProtoMessage()
func (*ThriftToMetadata) ProtoReflect ¶
func (x *ThriftToMetadata) ProtoReflect() protoreflect.Message
func (*ThriftToMetadata) Reset ¶
func (x *ThriftToMetadata) Reset()
func (*ThriftToMetadata) String ¶
func (x *ThriftToMetadata) String() string
type ThriftToMetadataPerRoute ¶
type ThriftToMetadataPerRoute struct { // The list of rules to apply to http request body to extract thrift metadata. RequestRules []*Rule `protobuf:"bytes,1,rep,name=request_rules,json=requestRules,proto3" json:"request_rules,omitempty"` // The list of rules to apply to http response body to extract thrift metadata. ResponseRules []*Rule `protobuf:"bytes,2,rep,name=response_rules,json=responseRules,proto3" json:"response_rules,omitempty"` // contains filtered or unexported fields }
Thrift to metadata configuration on a per-route basis, which overrides the global configuration for request rules and responses rules.
func (*ThriftToMetadataPerRoute) Descriptor
deprecated
func (*ThriftToMetadataPerRoute) Descriptor() ([]byte, []int)
Deprecated: Use ThriftToMetadataPerRoute.ProtoReflect.Descriptor instead.
func (*ThriftToMetadataPerRoute) GetRequestRules ¶
func (x *ThriftToMetadataPerRoute) GetRequestRules() []*Rule
func (*ThriftToMetadataPerRoute) GetResponseRules ¶
func (x *ThriftToMetadataPerRoute) GetResponseRules() []*Rule
func (*ThriftToMetadataPerRoute) ProtoMessage ¶
func (*ThriftToMetadataPerRoute) ProtoMessage()
func (*ThriftToMetadataPerRoute) ProtoReflect ¶
func (x *ThriftToMetadataPerRoute) ProtoReflect() protoreflect.Message
func (*ThriftToMetadataPerRoute) Reset ¶
func (x *ThriftToMetadataPerRoute) Reset()
func (*ThriftToMetadataPerRoute) String ¶
func (x *ThriftToMetadataPerRoute) String() string
Click to show internal directories.
Click to hide internal directories.