Class RouteConfiguration.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
io.envoyproxy.envoy.extensions.filters.network.generic_proxy.v3.RouteConfiguration.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,RouteConfigurationOrBuilder,Cloneable
- Enclosing class:
- RouteConfiguration
public static final class RouteConfiguration.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
implements RouteConfigurationOrBuilder
The generic proxy makes use of the xDS matching API for routing configurations.
In the below example, we combine a top level tree matcher with a linear matcher to match
the incoming requests, and send the matching requests to v1 of the upstream service.
.. code-block:: yaml
name: example
routes:
matcher_tree:
input:
name: request-service
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.ServiceMatchInput
exact_match_map:
map:
service_name_0:
matcher:
matcher_list:
matchers:
- predicate:
and_matcher:
predicate:
- single_predicate:
input:
name: request-properties
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.PropertyMatchInput
property_name: version
value_match:
exact: v1
- single_predicate:
input:
name: request-properties
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.matcher.v3.PropertyMatchInput
property_name: user
value_match:
exact: john
on_match:
action:
name: route
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.generic_proxy.action.v3.routeAction
cluster: cluster_0
Protobuf type envoy.extensions.filters.network.generic_proxy.v3.RouteConfiguration-
Method Summary
Modifier and TypeMethodDescriptionaddAllVirtualHosts(Iterable<? extends VirtualHost> values) An array of virtual hosts that make up the route table.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addVirtualHosts(int index, VirtualHost value) An array of virtual hosts that make up the route table.addVirtualHosts(int index, VirtualHost.Builder builderForValue) An array of virtual hosts that make up the route table.addVirtualHosts(VirtualHost value) An array of virtual hosts that make up the route table.addVirtualHosts(VirtualHost.Builder builderForValue) An array of virtual hosts that make up the route table.An array of virtual hosts that make up the route table.addVirtualHostsBuilder(int index) An array of virtual hosts that make up the route table.build()clear()clearField(com.google.protobuf.Descriptors.FieldDescriptor field) The name of the route configuration.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The match tree to use when resolving route actions for incoming requests.An array of virtual hosts that make up the route table.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetName()The name of the route configuration.com.google.protobuf.ByteStringThe name of the route configuration.The match tree to use when resolving route actions for incoming requests.The match tree to use when resolving route actions for incoming requests.The match tree to use when resolving route actions for incoming requests.getVirtualHosts(int index) An array of virtual hosts that make up the route table.getVirtualHostsBuilder(int index) An array of virtual hosts that make up the route table.An array of virtual hosts that make up the route table.intAn array of virtual hosts that make up the route table.An array of virtual hosts that make up the route table.getVirtualHostsOrBuilder(int index) An array of virtual hosts that make up the route table.List<? extends VirtualHostOrBuilder>An array of virtual hosts that make up the route table.booleanThe match tree to use when resolving route actions for incoming requests.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(RouteConfiguration other) mergeRoutes(Matcher value) The match tree to use when resolving route actions for incoming requests.mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeVirtualHosts(int index) An array of virtual hosts that make up the route table.The name of the route configuration.setNameBytes(com.google.protobuf.ByteString value) The name of the route configuration.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) The match tree to use when resolving route actions for incoming requests.setRoutes(Matcher.Builder builderForValue) The match tree to use when resolving route actions for incoming requests.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setVirtualHosts(int index, VirtualHost value) An array of virtual hosts that make up the route table.setVirtualHosts(int index, VirtualHost.Builder builderForValue) An array of virtual hosts that make up the route table.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
setField
public RouteConfiguration.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
setRepeatedField
public RouteConfiguration.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
addRepeatedField
public RouteConfiguration.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteConfiguration.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
mergeFrom
public RouteConfiguration.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RouteConfiguration.Builder>- Throws:
IOException
-
getName
The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.generic_proxy.v3.Rds.
string name = 1 [(.validate.rules) = { ... }- Specified by:
getNamein interfaceRouteConfigurationOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.generic_proxy.v3.Rds.
string name = 1 [(.validate.rules) = { ... }- Specified by:
getNameBytesin interfaceRouteConfigurationOrBuilder- Returns:
- The bytes for name.
-
setName
The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.generic_proxy.v3.Rds.
string name = 1 [(.validate.rules) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.generic_proxy.v3.Rds.
string name = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
The name of the route configuration. For example, it might match route_config_name in envoy.extensions.filters.network.generic_proxy.v3.Rds.
string name = 1 [(.validate.rules) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasRoutes
public boolean hasRoutes()The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2;- Specified by:
hasRoutesin interfaceRouteConfigurationOrBuilder- Returns:
- Whether the routes field is set.
-
getRoutes
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2;- Specified by:
getRoutesin interfaceRouteConfigurationOrBuilder- Returns:
- The routes.
-
setRoutes
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2; -
setRoutes
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2; -
mergeRoutes
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2; -
clearRoutes
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2; -
getRoutesBuilder
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2; -
getRoutesOrBuilder
The match tree to use when resolving route actions for incoming requests. If no any virtual host is configured in the ``virtual_hosts`` field or no special wildcard virtual host is configured, the ``routes`` field will be used as the default route table. If both the wildcard virtual host and ``routes`` are configured, the configuration will fail to load.
.xds.type.matcher.v3.Matcher routes = 2;- Specified by:
getRoutesOrBuilderin interfaceRouteConfigurationOrBuilder
-
getVirtualHostsList
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3;- Specified by:
getVirtualHostsListin interfaceRouteConfigurationOrBuilder
-
getVirtualHostsCount
public int getVirtualHostsCount()An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3;- Specified by:
getVirtualHostsCountin interfaceRouteConfigurationOrBuilder
-
getVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3;- Specified by:
getVirtualHostsin interfaceRouteConfigurationOrBuilder
-
setVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
setVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addAllVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
clearVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
removeVirtualHosts
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
getVirtualHostsBuilder
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
getVirtualHostsOrBuilder
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3;- Specified by:
getVirtualHostsOrBuilderin interfaceRouteConfigurationOrBuilder
-
getVirtualHostsOrBuilderList
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3;- Specified by:
getVirtualHostsOrBuilderListin interfaceRouteConfigurationOrBuilder
-
addVirtualHostsBuilder
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
addVirtualHostsBuilder
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
getVirtualHostsBuilderList
An array of virtual hosts that make up the route table.
repeated .envoy.extensions.filters.network.generic_proxy.v3.VirtualHost virtual_hosts = 3; -
setUnknownFields
public final RouteConfiguration.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-
mergeUnknownFields
public final RouteConfiguration.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<RouteConfiguration.Builder>
-