thrift_proxyv3

package
v1.36.11-2026011520535... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const RouteAction_ClusterHeader_case case_RouteAction_ClusterSpecifier = 6
View Source
const RouteAction_ClusterSpecifier_not_set_case case_RouteAction_ClusterSpecifier = 0
View Source
const RouteAction_Cluster_case case_RouteAction_ClusterSpecifier = 1
View Source
const RouteAction_WeightedClusters_case case_RouteAction_ClusterSpecifier = 2
View Source
const RouteMatch_MatchSpecifier_not_set_case case_RouteMatch_MatchSpecifier = 0
View Source
const RouteMatch_MethodName_case case_RouteMatch_MatchSpecifier = 1
View Source
const RouteMatch_ServiceName_case case_RouteMatch_MatchSpecifier = 2
View Source
const ThriftFilter_ConfigType_not_set_case case_ThriftFilter_ConfigType = 0
View Source
const ThriftFilter_TypedConfig_case case_ThriftFilter_ConfigType = 3

Variables

View Source
var (
	TransportType_name = map[int32]string{
		0: "AUTO_TRANSPORT",
		1: "FRAMED",
		2: "UNFRAMED",
		3: "HEADER",
	}
	TransportType_value = map[string]int32{
		"AUTO_TRANSPORT": 0,
		"FRAMED":         1,
		"UNFRAMED":       2,
		"HEADER":         3,
	}
)

Enum value maps for TransportType.

View Source
var (
	ProtocolType_name = map[int32]string{
		0: "AUTO_PROTOCOL",
		1: "BINARY",
		2: "LAX_BINARY",
		3: "COMPACT",
		4: "TWITTER",
	}
	ProtocolType_value = map[string]int32{
		"AUTO_PROTOCOL": 0,
		"BINARY":        1,
		"LAX_BINARY":    2,
		"COMPACT":       3,
		"TWITTER":       4,
	}
)

Enum value maps for ProtocolType.

View Source
var File_envoy_extensions_filters_network_thrift_proxy_v3_route_proto protoreflect.FileDescriptor
View Source
var File_envoy_extensions_filters_network_thrift_proxy_v3_thrift_proxy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ProtocolType

type ProtocolType int32

Thrift Protocol types supported by Envoy.

const (
	// For downstream connections, the Thrift proxy will attempt to determine which protocol to use.
	// Note that the older, non-strict (or lax) binary protocol is not included in automatic protocol
	// detection. For upstream connections, the Thrift proxy will use the same protocol as the
	// downstream connection.
	ProtocolType_AUTO_PROTOCOL ProtocolType = 0
	// The Thrift proxy will use the Thrift binary protocol.
	ProtocolType_BINARY ProtocolType = 1
	// The Thrift proxy will use Thrift non-strict binary protocol.
	ProtocolType_LAX_BINARY ProtocolType = 2
	// The Thrift proxy will use the Thrift compact protocol.
	ProtocolType_COMPACT ProtocolType = 3
	// The Thrift proxy will use the Thrift "Twitter" protocol implemented by the finagle library.
	//
	// Deprecated: Marked as deprecated in envoy/extensions/filters/network/thrift_proxy/v3/thrift_proxy.proto.
	ProtocolType_TWITTER ProtocolType = 4
)

func (ProtocolType) Descriptor

func (ProtocolType) Enum

func (x ProtocolType) Enum() *ProtocolType

func (ProtocolType) Number

func (ProtocolType) String

func (x ProtocolType) String() string

func (ProtocolType) Type

type Route

type Route struct {

	// Route matching parameters.
	Match *RouteMatch `protobuf:"bytes,1,opt,name=match,proto3" json:"match,omitempty"`
	// Route request to some upstream cluster.
	Route *RouteAction `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*Route) ClearMatch

func (x *Route) ClearMatch()

func (*Route) ClearRoute

func (x *Route) ClearRoute()

func (*Route) GetMatch

func (x *Route) GetMatch() *RouteMatch

func (*Route) GetRoute

func (x *Route) GetRoute() *RouteAction

func (*Route) HasMatch

func (x *Route) HasMatch() bool

func (*Route) HasRoute

func (x *Route) HasRoute() bool

func (*Route) ProtoMessage

func (*Route) ProtoMessage()

func (*Route) ProtoReflect

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

func (*Route) Reset

func (x *Route) Reset()

func (*Route) SetMatch

func (x *Route) SetMatch(v *RouteMatch)

func (*Route) SetRoute

func (x *Route) SetRoute(v *RouteAction)

func (*Route) String

func (x *Route) String() string

type RouteAction

type RouteAction struct {

	// Types that are valid to be assigned to ClusterSpecifier:
	//
	//	*RouteAction_Cluster
	//	*RouteAction_WeightedClusters
	//	*RouteAction_ClusterHeader
	ClusterSpecifier isRouteAction_ClusterSpecifier `protobuf_oneof:"cluster_specifier"`
	// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
	// the upstream cluster with metadata matching what is set in this field will be considered.
	// Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.metadata_match>`,
	// with values there taking precedence. Keys and values should be provided under the "envoy.lb"
	// metadata key.
	MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"`
	// Specifies a set of rate limit configurations that could be applied to the route.
	// N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders
	// action with the header name ":method-name".
	RateLimits []*v3.RateLimit `protobuf:"bytes,4,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
	// Strip the service prefix from the method name, if there's a prefix. For
	// example, the method call Service:method would end up being just method.
	StripServiceName bool `protobuf:"varint,5,opt,name=strip_service_name,json=stripServiceName,proto3" json:"strip_service_name,omitempty"`
	// Indicates that the route has request mirroring policies.
	RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#next-free-field: 8]

func (*RouteAction) ClearCluster

func (x *RouteAction) ClearCluster()

func (*RouteAction) ClearClusterHeader

func (x *RouteAction) ClearClusterHeader()

func (*RouteAction) ClearClusterSpecifier

func (x *RouteAction) ClearClusterSpecifier()

func (*RouteAction) ClearMetadataMatch

func (x *RouteAction) ClearMetadataMatch()

func (*RouteAction) ClearWeightedClusters

func (x *RouteAction) ClearWeightedClusters()

func (*RouteAction) GetCluster

func (x *RouteAction) GetCluster() string

func (*RouteAction) GetClusterHeader

func (x *RouteAction) GetClusterHeader() string

func (*RouteAction) GetClusterSpecifier

func (x *RouteAction) GetClusterSpecifier() isRouteAction_ClusterSpecifier

func (*RouteAction) GetMetadataMatch

func (x *RouteAction) GetMetadataMatch() *v31.Metadata

func (*RouteAction) GetRateLimits

func (x *RouteAction) GetRateLimits() []*v3.RateLimit

func (*RouteAction) GetRequestMirrorPolicies

func (x *RouteAction) GetRequestMirrorPolicies() []*RouteAction_RequestMirrorPolicy

func (*RouteAction) GetStripServiceName

func (x *RouteAction) GetStripServiceName() bool

func (*RouteAction) GetWeightedClusters

func (x *RouteAction) GetWeightedClusters() *WeightedCluster

func (*RouteAction) HasCluster

func (x *RouteAction) HasCluster() bool

func (*RouteAction) HasClusterHeader

func (x *RouteAction) HasClusterHeader() bool

func (*RouteAction) HasClusterSpecifier

func (x *RouteAction) HasClusterSpecifier() bool

func (*RouteAction) HasMetadataMatch

func (x *RouteAction) HasMetadataMatch() bool

func (*RouteAction) HasWeightedClusters

func (x *RouteAction) HasWeightedClusters() bool

func (*RouteAction) ProtoMessage

func (*RouteAction) ProtoMessage()

func (*RouteAction) ProtoReflect

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

func (*RouteAction) Reset

func (x *RouteAction) Reset()

func (*RouteAction) SetCluster

func (x *RouteAction) SetCluster(v string)

func (*RouteAction) SetClusterHeader

func (x *RouteAction) SetClusterHeader(v string)

func (*RouteAction) SetMetadataMatch

func (x *RouteAction) SetMetadataMatch(v *v31.Metadata)

func (*RouteAction) SetRateLimits

func (x *RouteAction) SetRateLimits(v []*v3.RateLimit)

func (*RouteAction) SetRequestMirrorPolicies

func (x *RouteAction) SetRequestMirrorPolicies(v []*RouteAction_RequestMirrorPolicy)

func (*RouteAction) SetStripServiceName

func (x *RouteAction) SetStripServiceName(v bool)

func (*RouteAction) SetWeightedClusters

func (x *RouteAction) SetWeightedClusters(v *WeightedCluster)

func (*RouteAction) String

func (x *RouteAction) String() string

func (*RouteAction) WhichClusterSpecifier

func (x *RouteAction) WhichClusterSpecifier() case_RouteAction_ClusterSpecifier

type RouteAction_Cluster

type RouteAction_Cluster struct {
	// Indicates a single upstream cluster to which the request should be routed
	// to.
	Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3,oneof"`
}

type RouteAction_ClusterHeader

type RouteAction_ClusterHeader struct {
	// Envoy will determine the cluster to route to by reading the value of the
	// Thrift header named by cluster_header from the request headers. If the
	// header is not found or the referenced cluster does not exist Envoy will
	// respond with an unknown method exception or an internal error exception,
	// respectively.
	ClusterHeader string `protobuf:"bytes,6,opt,name=cluster_header,json=clusterHeader,proto3,oneof"`
}

type RouteAction_RequestMirrorPolicy

type RouteAction_RequestMirrorPolicy struct {

	// Specifies the cluster that requests will be mirrored to. The cluster must
	// exist in the cluster manager configuration when the route configuration is loaded.
	// If it disappears at runtime, the shadow request will silently be ignored.
	Cluster string `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
	// If not specified, all requests to the target cluster will be mirrored.
	//
	// For some fraction N/D, a random number in the range [0,D) is selected. If the
	// number is <= the value of the numerator N, or if the key is not present, the default
	// value, the request will be mirrored.
	RuntimeFraction *v31.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"`
	// contains filtered or unexported fields
}

The router is capable of shadowing traffic from one cluster to another. The current implementation is "fire and forget," meaning Envoy will not wait for the shadow cluster to respond before returning the response from the primary cluster. All normal statistics are collected for the shadow cluster making this feature useful for testing.

.. note::

Shadowing will not be triggered if the primary cluster does not exist.

func (*RouteAction_RequestMirrorPolicy) ClearRuntimeFraction

func (x *RouteAction_RequestMirrorPolicy) ClearRuntimeFraction()

func (*RouteAction_RequestMirrorPolicy) GetCluster

func (x *RouteAction_RequestMirrorPolicy) GetCluster() string

func (*RouteAction_RequestMirrorPolicy) GetRuntimeFraction

func (*RouteAction_RequestMirrorPolicy) HasRuntimeFraction

func (x *RouteAction_RequestMirrorPolicy) HasRuntimeFraction() bool

func (*RouteAction_RequestMirrorPolicy) ProtoMessage

func (*RouteAction_RequestMirrorPolicy) ProtoMessage()

func (*RouteAction_RequestMirrorPolicy) ProtoReflect

func (*RouteAction_RequestMirrorPolicy) Reset

func (*RouteAction_RequestMirrorPolicy) SetCluster

func (x *RouteAction_RequestMirrorPolicy) SetCluster(v string)

func (*RouteAction_RequestMirrorPolicy) SetRuntimeFraction

func (*RouteAction_RequestMirrorPolicy) String

type RouteAction_RequestMirrorPolicy_builder

type RouteAction_RequestMirrorPolicy_builder struct {

	// Specifies the cluster that requests will be mirrored to. The cluster must
	// exist in the cluster manager configuration when the route configuration is loaded.
	// If it disappears at runtime, the shadow request will silently be ignored.
	Cluster string
	// If not specified, all requests to the target cluster will be mirrored.
	//
	// For some fraction N/D, a random number in the range [0,D) is selected. If the
	// number is <= the value of the numerator N, or if the key is not present, the default
	// value, the request will be mirrored.
	RuntimeFraction *v31.RuntimeFractionalPercent
	// contains filtered or unexported fields
}

func (RouteAction_RequestMirrorPolicy_builder) Build

type RouteAction_WeightedClusters

type RouteAction_WeightedClusters struct {
	// Multiple upstream clusters can be specified for a given route. The
	// request is routed to one of the upstream clusters based on weights
	// assigned to each cluster.
	WeightedClusters *WeightedCluster `protobuf:"bytes,2,opt,name=weighted_clusters,json=weightedClusters,proto3,oneof"`
}

type RouteAction_builder

type RouteAction_builder struct {

	// Fields of oneof ClusterSpecifier:
	// Indicates a single upstream cluster to which the request should be routed
	// to.
	Cluster *string
	// Multiple upstream clusters can be specified for a given route. The
	// request is routed to one of the upstream clusters based on weights
	// assigned to each cluster.
	WeightedClusters *WeightedCluster
	// Envoy will determine the cluster to route to by reading the value of the
	// Thrift header named by cluster_header from the request headers. If the
	// header is not found or the referenced cluster does not exist Envoy will
	// respond with an unknown method exception or an internal error exception,
	// respectively.
	ClusterHeader *string
	// -- end of ClusterSpecifier
	// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
	// the upstream cluster with metadata matching what is set in this field will be considered.
	// Note that this will be merged with what's provided in :ref:`WeightedCluster.metadata_match
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.WeightedCluster.ClusterWeight.metadata_match>`,
	// with values there taking precedence. Keys and values should be provided under the "envoy.lb"
	// metadata key.
	MetadataMatch *v31.Metadata
	// Specifies a set of rate limit configurations that could be applied to the route.
	// N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders
	// action with the header name ":method-name".
	RateLimits []*v3.RateLimit
	// Strip the service prefix from the method name, if there's a prefix. For
	// example, the method call Service:method would end up being just method.
	StripServiceName bool
	// Indicates that the route has request mirroring policies.
	RequestMirrorPolicies []*RouteAction_RequestMirrorPolicy
	// contains filtered or unexported fields
}

func (RouteAction_builder) Build

func (b0 RouteAction_builder) Build() *RouteAction

type RouteConfiguration

type RouteConfiguration struct {

	// The name of the route configuration. This name is used in asynchronous route discovery.
	// For example, it might match
	// :ref:`route_config_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.Trds.route_config_name>` in
	// :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.Trds`.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The list of routes that will be matched, in order, against incoming requests. The first route
	// that matches will be used.
	Routes []*Route `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes,omitempty"`
	// An optional boolean that specifies whether the clusters that the route
	// table refers to will be validated by the cluster manager. If set to true
	// and a route refers to a non-existent cluster, the route table will not
	// load. If set to false and a route refers to a non-existent cluster, the
	// route table will load and the router filter will return a INTERNAL_ERROR
	// if the route is selected at runtime. This setting defaults to true if the route table
	// is statically defined via the :ref:`route_config
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.ThriftProxy.route_config>`
	// option. This setting default to false if the route table is loaded dynamically via the
	// :ref:`trds
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.ThriftProxy.trds>`
	// option. Users may wish to override the default behavior in certain cases (for example when
	// using CDS with a static route table).
	ValidateClusters *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=validate_clusters,json=validateClusters,proto3" json:"validate_clusters,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteConfiguration) ClearValidateClusters

func (x *RouteConfiguration) ClearValidateClusters()

func (*RouteConfiguration) GetName

func (x *RouteConfiguration) GetName() string

func (*RouteConfiguration) GetRoutes

func (x *RouteConfiguration) GetRoutes() []*Route

func (*RouteConfiguration) GetValidateClusters

func (x *RouteConfiguration) GetValidateClusters() *wrapperspb.BoolValue

func (*RouteConfiguration) HasValidateClusters

func (x *RouteConfiguration) HasValidateClusters() bool

func (*RouteConfiguration) ProtoMessage

func (*RouteConfiguration) ProtoMessage()

func (*RouteConfiguration) ProtoReflect

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

func (*RouteConfiguration) Reset

func (x *RouteConfiguration) Reset()

func (*RouteConfiguration) SetName

func (x *RouteConfiguration) SetName(v string)

func (*RouteConfiguration) SetRoutes

func (x *RouteConfiguration) SetRoutes(v []*Route)

func (*RouteConfiguration) SetValidateClusters

func (x *RouteConfiguration) SetValidateClusters(v *wrapperspb.BoolValue)

func (*RouteConfiguration) String

func (x *RouteConfiguration) String() string

type RouteConfiguration_builder

type RouteConfiguration_builder struct {

	// The name of the route configuration. This name is used in asynchronous route discovery.
	// For example, it might match
	// :ref:`route_config_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.Trds.route_config_name>` in
	// :ref:`envoy_v3_api_msg_extensions.filters.network.thrift_proxy.v3.Trds`.
	Name string
	// The list of routes that will be matched, in order, against incoming requests. The first route
	// that matches will be used.
	Routes []*Route
	// An optional boolean that specifies whether the clusters that the route
	// table refers to will be validated by the cluster manager. If set to true
	// and a route refers to a non-existent cluster, the route table will not
	// load. If set to false and a route refers to a non-existent cluster, the
	// route table will load and the router filter will return a INTERNAL_ERROR
	// if the route is selected at runtime. This setting defaults to true if the route table
	// is statically defined via the :ref:`route_config
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.ThriftProxy.route_config>`
	// option. This setting default to false if the route table is loaded dynamically via the
	// :ref:`trds
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.ThriftProxy.trds>`
	// option. Users may wish to override the default behavior in certain cases (for example when
	// using CDS with a static route table).
	ValidateClusters *wrapperspb.BoolValue
	// contains filtered or unexported fields
}

func (RouteConfiguration_builder) Build

type RouteMatch

type RouteMatch struct {

	// Types that are valid to be assigned to MatchSpecifier:
	//
	//	*RouteMatch_MethodName
	//	*RouteMatch_ServiceName
	MatchSpecifier isRouteMatch_MatchSpecifier `protobuf_oneof:"match_specifier"`
	// Inverts whatever matching is done in the :ref:`method_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.method_name>` or
	// :ref:`service_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.service_name>` fields.
	// Cannot be combined with wildcard matching as that would result in routes never being matched.
	//
	// .. note::
	//
	//	This does not invert matching done as part of the :ref:`headers field
	//	<envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.headers>` field. To
	//	invert header matching, see :ref:`invert_match
	//	<envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`.
	Invert bool `protobuf:"varint,3,opt,name=invert,proto3" json:"invert,omitempty"`
	// Specifies a set of headers that the route should match on. The router will check the request’s
	// headers against all the specified headers in the route config. A match will happen if all the
	// headers in the route are present in the request with the same values (or based on presence if
	// the value field is not in the config). Note that this only applies for Thrift transports and/or
	// protocols that support headers.
	Headers []*v3.HeaderMatcher `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteMatch) ClearMatchSpecifier

func (x *RouteMatch) ClearMatchSpecifier()

func (*RouteMatch) ClearMethodName

func (x *RouteMatch) ClearMethodName()

func (*RouteMatch) ClearServiceName

func (x *RouteMatch) ClearServiceName()

func (*RouteMatch) GetHeaders

func (x *RouteMatch) GetHeaders() []*v3.HeaderMatcher

func (*RouteMatch) GetInvert

func (x *RouteMatch) GetInvert() bool

func (*RouteMatch) GetMatchSpecifier

func (x *RouteMatch) GetMatchSpecifier() isRouteMatch_MatchSpecifier

func (*RouteMatch) GetMethodName

func (x *RouteMatch) GetMethodName() string

func (*RouteMatch) GetServiceName

func (x *RouteMatch) GetServiceName() string

func (*RouteMatch) HasMatchSpecifier

func (x *RouteMatch) HasMatchSpecifier() bool

func (*RouteMatch) HasMethodName

func (x *RouteMatch) HasMethodName() bool

func (*RouteMatch) HasServiceName

func (x *RouteMatch) HasServiceName() bool

func (*RouteMatch) ProtoMessage

func (*RouteMatch) ProtoMessage()

func (*RouteMatch) ProtoReflect

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

func (*RouteMatch) Reset

func (x *RouteMatch) Reset()

func (*RouteMatch) SetHeaders

func (x *RouteMatch) SetHeaders(v []*v3.HeaderMatcher)

func (*RouteMatch) SetInvert

func (x *RouteMatch) SetInvert(v bool)

func (*RouteMatch) SetMethodName

func (x *RouteMatch) SetMethodName(v string)

func (*RouteMatch) SetServiceName

func (x *RouteMatch) SetServiceName(v string)

func (*RouteMatch) String

func (x *RouteMatch) String() string

func (*RouteMatch) WhichMatchSpecifier

func (x *RouteMatch) WhichMatchSpecifier() case_RouteMatch_MatchSpecifier

type RouteMatch_MethodName

type RouteMatch_MethodName struct {
	// If specified, the route must exactly match the request method name. As a special case, an
	// empty string matches any request method name.
	MethodName string `protobuf:"bytes,1,opt,name=method_name,json=methodName,proto3,oneof"`
}

type RouteMatch_ServiceName

type RouteMatch_ServiceName struct {
	// If specified, the route must have the service name as the request method name prefix. As a
	// special case, an empty string matches any service name. Only relevant when service
	// multiplexing.
	ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3,oneof"`
}

type RouteMatch_builder

type RouteMatch_builder struct {

	// Fields of oneof MatchSpecifier:
	// If specified, the route must exactly match the request method name. As a special case, an
	// empty string matches any request method name.
	MethodName *string
	// If specified, the route must have the service name as the request method name prefix. As a
	// special case, an empty string matches any service name. Only relevant when service
	// multiplexing.
	ServiceName *string
	// -- end of MatchSpecifier
	// Inverts whatever matching is done in the :ref:`method_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.method_name>` or
	// :ref:`service_name
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.service_name>` fields.
	// Cannot be combined with wildcard matching as that would result in routes never being matched.
	//
	// .. note::
	//
	//	This does not invert matching done as part of the :ref:`headers field
	//	<envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteMatch.headers>` field. To
	//	invert header matching, see :ref:`invert_match
	//	<envoy_v3_api_field_config.route.v3.HeaderMatcher.invert_match>`.
	Invert bool
	// Specifies a set of headers that the route should match on. The router will check the request’s
	// headers against all the specified headers in the route config. A match will happen if all the
	// headers in the route are present in the request with the same values (or based on presence if
	// the value field is not in the config). Note that this only applies for Thrift transports and/or
	// protocols that support headers.
	Headers []*v3.HeaderMatcher
	// contains filtered or unexported fields
}

func (RouteMatch_builder) Build

func (b0 RouteMatch_builder) Build() *RouteMatch

type Route_builder

type Route_builder struct {

	// Route matching parameters.
	Match *RouteMatch
	// Route request to some upstream cluster.
	Route *RouteAction
	// contains filtered or unexported fields
}

func (Route_builder) Build

func (b0 Route_builder) Build() *Route

type ThriftFilter

type ThriftFilter struct {

	// The name of the filter to instantiate. The name must match a supported
	// filter. The built-in filters are:
	//
	// [#comment:TODO(zuercher): Auto generate the following list]
	// * :ref:`envoy.filters.thrift.router <config_thrift_filters_router>`
	// * :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit>`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Filter specific configuration which depends on the filter being instantiated. See the supported
	// filters for further documentation.
	//
	// Types that are valid to be assigned to ConfigType:
	//
	//	*ThriftFilter_TypedConfig
	ConfigType isThriftFilter_ConfigType `protobuf_oneof:"config_type"`
	// contains filtered or unexported fields
}

ThriftFilter configures a Thrift filter.

func (*ThriftFilter) ClearConfigType

func (x *ThriftFilter) ClearConfigType()

func (*ThriftFilter) ClearTypedConfig

func (x *ThriftFilter) ClearTypedConfig()

func (*ThriftFilter) GetConfigType

func (x *ThriftFilter) GetConfigType() isThriftFilter_ConfigType

func (*ThriftFilter) GetName

func (x *ThriftFilter) GetName() string

func (*ThriftFilter) GetTypedConfig

func (x *ThriftFilter) GetTypedConfig() *anypb.Any

func (*ThriftFilter) HasConfigType

func (x *ThriftFilter) HasConfigType() bool

func (*ThriftFilter) HasTypedConfig

func (x *ThriftFilter) HasTypedConfig() bool

func (*ThriftFilter) ProtoMessage

func (*ThriftFilter) ProtoMessage()

func (*ThriftFilter) ProtoReflect

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

func (*ThriftFilter) Reset

func (x *ThriftFilter) Reset()

func (*ThriftFilter) SetName

func (x *ThriftFilter) SetName(v string)

func (*ThriftFilter) SetTypedConfig

func (x *ThriftFilter) SetTypedConfig(v *anypb.Any)

func (*ThriftFilter) String

func (x *ThriftFilter) String() string

func (*ThriftFilter) WhichConfigType

func (x *ThriftFilter) WhichConfigType() case_ThriftFilter_ConfigType

type ThriftFilter_TypedConfig

type ThriftFilter_TypedConfig struct {
	TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"`
}

type ThriftFilter_builder

type ThriftFilter_builder struct {

	// The name of the filter to instantiate. The name must match a supported
	// filter. The built-in filters are:
	//
	// [#comment:TODO(zuercher): Auto generate the following list]
	// * :ref:`envoy.filters.thrift.router <config_thrift_filters_router>`
	// * :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit>`
	Name string

	// Fields of oneof ConfigType:
	TypedConfig *anypb.Any
	// contains filtered or unexported fields
}

func (ThriftFilter_builder) Build

func (b0 ThriftFilter_builder) Build() *ThriftFilter

type ThriftProtocolOptions

type ThriftProtocolOptions struct {

	// Supplies the type of transport that the Thrift proxy should use for upstream connections.
	// Selecting
	// :ref:`AUTO_TRANSPORT<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.TransportType.AUTO_TRANSPORT>`,
	// which is the default, causes the proxy to use the same transport as the downstream connection.
	Transport TransportType `` /* 140-byte string literal not displayed */
	// Supplies the type of protocol that the Thrift proxy should use for upstream connections.
	// Selecting
	// :ref:`AUTO_PROTOCOL<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.ProtocolType.AUTO_PROTOCOL>`,
	// which is the default, causes the proxy to use the same protocol as the downstream connection.
	Protocol ProtocolType `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in in :ref:`typed_extension_protocol_options<envoy_v3_api_field_config.cluster.v3.Cluster.typed_extension_protocol_options>`, keyed by the name “envoy.filters.network.thrift_proxy“.

func (*ThriftProtocolOptions) GetProtocol

func (x *ThriftProtocolOptions) GetProtocol() ProtocolType

func (*ThriftProtocolOptions) GetTransport

func (x *ThriftProtocolOptions) GetTransport() TransportType

func (*ThriftProtocolOptions) ProtoMessage

func (*ThriftProtocolOptions) ProtoMessage()

func (*ThriftProtocolOptions) ProtoReflect

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

func (*ThriftProtocolOptions) Reset

func (x *ThriftProtocolOptions) Reset()

func (*ThriftProtocolOptions) SetProtocol

func (x *ThriftProtocolOptions) SetProtocol(v ProtocolType)

func (*ThriftProtocolOptions) SetTransport

func (x *ThriftProtocolOptions) SetTransport(v TransportType)

func (*ThriftProtocolOptions) String

func (x *ThriftProtocolOptions) String() string

type ThriftProtocolOptions_builder

type ThriftProtocolOptions_builder struct {

	// Supplies the type of transport that the Thrift proxy should use for upstream connections.
	// Selecting
	// :ref:`AUTO_TRANSPORT<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.TransportType.AUTO_TRANSPORT>`,
	// which is the default, causes the proxy to use the same transport as the downstream connection.
	Transport TransportType
	// Supplies the type of protocol that the Thrift proxy should use for upstream connections.
	// Selecting
	// :ref:`AUTO_PROTOCOL<envoy_v3_api_enum_value_extensions.filters.network.thrift_proxy.v3.ProtocolType.AUTO_PROTOCOL>`,
	// which is the default, causes the proxy to use the same protocol as the downstream connection.
	Protocol ProtocolType
	// contains filtered or unexported fields
}

func (ThriftProtocolOptions_builder) Build

type ThriftProxy

type ThriftProxy struct {

	// 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 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>`.
	Protocol ProtocolType `` /* 137-byte string literal not displayed */
	// The human readable prefix to use when emitting statistics.
	StatPrefix string `protobuf:"bytes,1,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// The route table for the connection manager is static and is specified in this property.
	// It is invalid to define both “route_config“ and “trds“.
	RouteConfig *RouteConfiguration `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3" json:"route_config,omitempty"`
	// Use xDS to fetch the route configuration. It is invalid to define both “route_config“ and “trds“.
	Trds *Trds `protobuf:"bytes,8,opt,name=trds,proto3" json:"trds,omitempty"`
	// A list of individual Thrift filters that make up the filter chain for requests made to the
	// Thrift proxy. Order matters as the filters are processed sequentially. For backwards
	// compatibility, if no thrift_filters are specified, a default Thrift router filter
	// (“envoy.filters.thrift.router“) is used.
	// [#extension-category: envoy.thrift_proxy.filters]
	ThriftFilters []*ThriftFilter `protobuf:"bytes,5,rep,name=thrift_filters,json=thriftFilters,proto3" json:"thrift_filters,omitempty"`
	// If set to true, Envoy will try to skip decode data after metadata in the Thrift message.
	// This mode will only work if the upstream and downstream protocols are the same and the transports
	// are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will
	// fallback to decode the data.
	PayloadPassthrough bool `protobuf:"varint,6,opt,name=payload_passthrough,json=payloadPassthrough,proto3" json:"payload_passthrough,omitempty"`
	// Optional maximum requests for a single downstream connection. If not specified, there is no limit.
	MaxRequestsPerConnection *wrapperspb.UInt32Value `` /* 137-byte string literal not displayed */
	// Configuration for :ref:`access logs <arch_overview_access_logs>`
	// emitted by Thrift proxy.
	AccessLog []*v31.AccessLog `protobuf:"bytes,9,rep,name=access_log,json=accessLog,proto3" json:"access_log,omitempty"`
	// If set to true, Envoy will preserve the case of Thrift header keys instead of serializing them to
	// lower case as per the default behavior. Note that NUL, CR and LF characters will also be preserved
	// as mandated by the Thrift spec.
	//
	// More info: https://github.com/apache/thrift/commit/e165fa3c85d00cb984f4d9635ed60909a1266ce1.
	HeaderKeysPreserveCase bool `` /* 133-byte string literal not displayed */
	// contains filtered or unexported fields
}

[#next-free-field: 11]

func (*ThriftProxy) ClearMaxRequestsPerConnection

func (x *ThriftProxy) ClearMaxRequestsPerConnection()

func (*ThriftProxy) ClearRouteConfig

func (x *ThriftProxy) ClearRouteConfig()

func (*ThriftProxy) ClearTrds

func (x *ThriftProxy) ClearTrds()

func (*ThriftProxy) GetAccessLog

func (x *ThriftProxy) GetAccessLog() []*v31.AccessLog

func (*ThriftProxy) GetHeaderKeysPreserveCase

func (x *ThriftProxy) GetHeaderKeysPreserveCase() bool

func (*ThriftProxy) GetMaxRequestsPerConnection

func (x *ThriftProxy) GetMaxRequestsPerConnection() *wrapperspb.UInt32Value

func (*ThriftProxy) GetPayloadPassthrough

func (x *ThriftProxy) GetPayloadPassthrough() bool

func (*ThriftProxy) GetProtocol

func (x *ThriftProxy) GetProtocol() ProtocolType

func (*ThriftProxy) GetRouteConfig

func (x *ThriftProxy) GetRouteConfig() *RouteConfiguration

func (*ThriftProxy) GetStatPrefix

func (x *ThriftProxy) GetStatPrefix() string

func (*ThriftProxy) GetThriftFilters

func (x *ThriftProxy) GetThriftFilters() []*ThriftFilter

func (*ThriftProxy) GetTransport

func (x *ThriftProxy) GetTransport() TransportType

func (*ThriftProxy) GetTrds

func (x *ThriftProxy) GetTrds() *Trds

func (*ThriftProxy) HasMaxRequestsPerConnection

func (x *ThriftProxy) HasMaxRequestsPerConnection() bool

func (*ThriftProxy) HasRouteConfig

func (x *ThriftProxy) HasRouteConfig() bool

func (*ThriftProxy) HasTrds

func (x *ThriftProxy) HasTrds() bool

func (*ThriftProxy) ProtoMessage

func (*ThriftProxy) ProtoMessage()

func (*ThriftProxy) ProtoReflect

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

func (*ThriftProxy) Reset

func (x *ThriftProxy) Reset()

func (*ThriftProxy) SetAccessLog

func (x *ThriftProxy) SetAccessLog(v []*v31.AccessLog)

func (*ThriftProxy) SetHeaderKeysPreserveCase

func (x *ThriftProxy) SetHeaderKeysPreserveCase(v bool)

func (*ThriftProxy) SetMaxRequestsPerConnection

func (x *ThriftProxy) SetMaxRequestsPerConnection(v *wrapperspb.UInt32Value)

func (*ThriftProxy) SetPayloadPassthrough

func (x *ThriftProxy) SetPayloadPassthrough(v bool)

func (*ThriftProxy) SetProtocol

func (x *ThriftProxy) SetProtocol(v ProtocolType)

func (*ThriftProxy) SetRouteConfig

func (x *ThriftProxy) SetRouteConfig(v *RouteConfiguration)

func (*ThriftProxy) SetStatPrefix

func (x *ThriftProxy) SetStatPrefix(v string)

func (*ThriftProxy) SetThriftFilters

func (x *ThriftProxy) SetThriftFilters(v []*ThriftFilter)

func (*ThriftProxy) SetTransport

func (x *ThriftProxy) SetTransport(v TransportType)

func (*ThriftProxy) SetTrds

func (x *ThriftProxy) SetTrds(v *Trds)

func (*ThriftProxy) String

func (x *ThriftProxy) String() string

type ThriftProxy_builder

type ThriftProxy_builder struct {

	// 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 TransportType
	// 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>`.
	Protocol ProtocolType
	// The human readable prefix to use when emitting statistics.
	StatPrefix string
	// The route table for the connection manager is static and is specified in this property.
	// It is invalid to define both “route_config“ and “trds“.
	RouteConfig *RouteConfiguration
	// Use xDS to fetch the route configuration. It is invalid to define both “route_config“ and “trds“.
	Trds *Trds
	// A list of individual Thrift filters that make up the filter chain for requests made to the
	// Thrift proxy. Order matters as the filters are processed sequentially. For backwards
	// compatibility, if no thrift_filters are specified, a default Thrift router filter
	// (“envoy.filters.thrift.router“) is used.
	// [#extension-category: envoy.thrift_proxy.filters]
	ThriftFilters []*ThriftFilter
	// If set to true, Envoy will try to skip decode data after metadata in the Thrift message.
	// This mode will only work if the upstream and downstream protocols are the same and the transports
	// are Framed or Header, and the protocol is not Twitter. Otherwise Envoy will
	// fallback to decode the data.
	PayloadPassthrough bool
	// Optional maximum requests for a single downstream connection. If not specified, there is no limit.
	MaxRequestsPerConnection *wrapperspb.UInt32Value
	// Configuration for :ref:`access logs <arch_overview_access_logs>`
	// emitted by Thrift proxy.
	AccessLog []*v31.AccessLog
	// If set to true, Envoy will preserve the case of Thrift header keys instead of serializing them to
	// lower case as per the default behavior. Note that NUL, CR and LF characters will also be preserved
	// as mandated by the Thrift spec.
	//
	// More info: https://github.com/apache/thrift/commit/e165fa3c85d00cb984f4d9635ed60909a1266ce1.
	HeaderKeysPreserveCase bool
	// contains filtered or unexported fields
}

func (ThriftProxy_builder) Build

func (b0 ThriftProxy_builder) Build() *ThriftProxy

type TransportType

type TransportType int32

Thrift transport types supported by Envoy.

const (
	// For downstream connections, the Thrift proxy will attempt to determine which transport to use.
	// For upstream connections, the Thrift proxy will use same transport as the downstream
	// connection.
	TransportType_AUTO_TRANSPORT TransportType = 0
	// The Thrift proxy will use the Thrift framed transport.
	TransportType_FRAMED TransportType = 1
	// The Thrift proxy will use the Thrift unframed transport.
	TransportType_UNFRAMED TransportType = 2
	// The Thrift proxy will assume the client is using the Thrift header transport.
	TransportType_HEADER TransportType = 3
)

func (TransportType) Descriptor

func (TransportType) Enum

func (x TransportType) Enum() *TransportType

func (TransportType) Number

func (TransportType) String

func (x TransportType) String() string

func (TransportType) Type

type Trds

type Trds struct {

	// Configuration source specifier.
	// In case of “api_config_source“ only aggregated “api_type“ is supported.
	ConfigSource *v3.ConfigSource `protobuf:"bytes,1,opt,name=config_source,json=configSource,proto3" json:"config_source,omitempty"`
	// The name of the route configuration. This allows to use different route
	// configurations. Tells which route configuration should be fetched from the configuration source.
	// Leave unspecified is also valid and means the unnamed route configuration.
	RouteConfigName string `protobuf:"bytes,2,opt,name=route_config_name,json=routeConfigName,proto3" json:"route_config_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Trds) ClearConfigSource

func (x *Trds) ClearConfigSource()

func (*Trds) GetConfigSource

func (x *Trds) GetConfigSource() *v3.ConfigSource

func (*Trds) GetRouteConfigName

func (x *Trds) GetRouteConfigName() string

func (*Trds) HasConfigSource

func (x *Trds) HasConfigSource() bool

func (*Trds) ProtoMessage

func (*Trds) ProtoMessage()

func (*Trds) ProtoReflect

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

func (*Trds) Reset

func (x *Trds) Reset()

func (*Trds) SetConfigSource

func (x *Trds) SetConfigSource(v *v3.ConfigSource)

func (*Trds) SetRouteConfigName

func (x *Trds) SetRouteConfigName(v string)

func (*Trds) String

func (x *Trds) String() string

type Trds_builder

type Trds_builder struct {

	// Configuration source specifier.
	// In case of “api_config_source“ only aggregated “api_type“ is supported.
	ConfigSource *v3.ConfigSource
	// The name of the route configuration. This allows to use different route
	// configurations. Tells which route configuration should be fetched from the configuration source.
	// Leave unspecified is also valid and means the unnamed route configuration.
	RouteConfigName string
	// contains filtered or unexported fields
}

func (Trds_builder) Build

func (b0 Trds_builder) Build() *Trds

type WeightedCluster

type WeightedCluster struct {

	// Specifies one or more upstream clusters associated with the route.
	Clusters []*WeightedCluster_ClusterWeight `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// contains filtered or unexported fields
}

Allows for specification of multiple upstream clusters along with weights that indicate the percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster based on these weights.

func (*WeightedCluster) GetClusters

func (x *WeightedCluster) GetClusters() []*WeightedCluster_ClusterWeight

func (*WeightedCluster) ProtoMessage

func (*WeightedCluster) ProtoMessage()

func (*WeightedCluster) ProtoReflect

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

func (*WeightedCluster) Reset

func (x *WeightedCluster) Reset()

func (*WeightedCluster) SetClusters

func (x *WeightedCluster) SetClusters(v []*WeightedCluster_ClusterWeight)

func (*WeightedCluster) String

func (x *WeightedCluster) String() string

type WeightedCluster_ClusterWeight

type WeightedCluster_ClusterWeight struct {

	// Name of the upstream cluster.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// When a request matches the route, the choice of an upstream cluster is determined by its
	// weight. The sum of weights across all entries in the clusters array determines the total
	// weight.
	Weight *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=weight,proto3" json:"weight,omitempty"`
	// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
	// the upstream cluster with metadata matching what is set in this field, combined with what's
	// provided in :ref:`RouteAction's metadata_match
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteAction.metadata_match>`,
	// will be considered. Values here will take precedence. Keys and values should be provided
	// under the "envoy.lb" metadata key.
	MetadataMatch *v31.Metadata `protobuf:"bytes,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"`
	// contains filtered or unexported fields
}

func (*WeightedCluster_ClusterWeight) ClearMetadataMatch

func (x *WeightedCluster_ClusterWeight) ClearMetadataMatch()

func (*WeightedCluster_ClusterWeight) ClearWeight

func (x *WeightedCluster_ClusterWeight) ClearWeight()

func (*WeightedCluster_ClusterWeight) GetMetadataMatch

func (x *WeightedCluster_ClusterWeight) GetMetadataMatch() *v31.Metadata

func (*WeightedCluster_ClusterWeight) GetName

func (*WeightedCluster_ClusterWeight) GetWeight

func (*WeightedCluster_ClusterWeight) HasMetadataMatch

func (x *WeightedCluster_ClusterWeight) HasMetadataMatch() bool

func (*WeightedCluster_ClusterWeight) HasWeight

func (x *WeightedCluster_ClusterWeight) HasWeight() bool

func (*WeightedCluster_ClusterWeight) ProtoMessage

func (*WeightedCluster_ClusterWeight) ProtoMessage()

func (*WeightedCluster_ClusterWeight) ProtoReflect

func (*WeightedCluster_ClusterWeight) Reset

func (x *WeightedCluster_ClusterWeight) Reset()

func (*WeightedCluster_ClusterWeight) SetMetadataMatch

func (x *WeightedCluster_ClusterWeight) SetMetadataMatch(v *v31.Metadata)

func (*WeightedCluster_ClusterWeight) SetName

func (x *WeightedCluster_ClusterWeight) SetName(v string)

func (*WeightedCluster_ClusterWeight) SetWeight

func (*WeightedCluster_ClusterWeight) String

type WeightedCluster_ClusterWeight_builder

type WeightedCluster_ClusterWeight_builder struct {

	// Name of the upstream cluster.
	Name string
	// When a request matches the route, the choice of an upstream cluster is determined by its
	// weight. The sum of weights across all entries in the clusters array determines the total
	// weight.
	Weight *wrapperspb.UInt32Value
	// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in
	// the upstream cluster with metadata matching what is set in this field, combined with what's
	// provided in :ref:`RouteAction's metadata_match
	// <envoy_v3_api_field_extensions.filters.network.thrift_proxy.v3.RouteAction.metadata_match>`,
	// will be considered. Values here will take precedence. Keys and values should be provided
	// under the "envoy.lb" metadata key.
	MetadataMatch *v31.Metadata
	// contains filtered or unexported fields
}

func (WeightedCluster_ClusterWeight_builder) Build

type WeightedCluster_builder

type WeightedCluster_builder struct {

	// Specifies one or more upstream clusters associated with the route.
	Clusters []*WeightedCluster_ClusterWeight
	// contains filtered or unexported fields
}

func (WeightedCluster_builder) Build

Source Files

  • route.pb.go
  • thrift_proxy.pb.go

Jump to

Keyboard shortcuts

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