public final class ScopedRouteConfiguration extends com.google.protobuf.GeneratedMessageV3 implements ScopedRouteConfigurationOrBuilder
Specifies a routing scope, which associates a
:ref:`Key<envoy_api_msg_config.route.v4alpha.ScopedRouteConfiguration.Key>` to a
:ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` (identified by its resource name).
The HTTP connection manager builds up a table consisting of these Key to
RouteConfiguration mappings, and looks up the RouteConfiguration to use per
request according to the algorithm specified in the
:ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scope_key_builder>`
assigned to the HttpConnectionManager.
For example, with the following configurations (in YAML):
HttpConnectionManager config:
.. code::
...
scoped_routes:
name: foo-scoped-routes
scope_key_builder:
fragments:
- header_value_extractor:
name: X-Route-Selector
element_separator: ,
element:
separator: =
key: vip
ScopedRouteConfiguration resources (specified statically via
:ref:`scoped_route_configurations_list<envoy_api_field_extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scoped_route_configurations_list>`
or obtained dynamically via SRDS):
.. code::
(1)
name: route-scope1
route_configuration_name: route-config1
key:
fragments:
- string_key: 172.10.10.20
(2)
name: route-scope2
route_configuration_name: route-config2
key:
fragments:
- string_key: 172.20.20.30
A request from a client such as:
.. code::
GET / HTTP/1.1
Host: foo.com
X-Route-Selector: vip=172.10.10.20
would result in the routing table defined by the `route-config1`
RouteConfiguration being assigned to the HTTP request/stream.
Protobuf type envoy.config.route.v4alpha.ScopedRouteConfiguration| Modifier and Type | Class and Description |
|---|---|
static class |
ScopedRouteConfiguration.Builder
Specifies a routing scope, which associates a
:ref:`Key<envoy_api_msg_config.route.v4alpha.ScopedRouteConfiguration.Key>` to a
:ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` (identified by its resource name).
|
static class |
ScopedRouteConfiguration.Key
Specifies a key which is matched against the output of the
:ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v4alpha.ScopedRoutes.scope_key_builder>`
specified in the HttpConnectionManager.
|
static interface |
ScopedRouteConfiguration.KeyOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
ON_DEMAND_FIELD_NUMBER |
static int |
ROUTE_CONFIGURATION_NAME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static ScopedRouteConfiguration |
getDefaultInstance() |
ScopedRouteConfiguration |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
ScopedRouteConfiguration.Key |
getKey()
The key to match against.
|
ScopedRouteConfiguration.KeyOrBuilder |
getKeyOrBuilder()
The key to match against.
|
String |
getName()
The name assigned to the routing scope.
|
com.google.protobuf.ByteString |
getNameBytes()
The name assigned to the routing scope.
|
boolean |
getOnDemand()
Whether the RouteConfiguration should be loaded on demand.
|
com.google.protobuf.Parser<ScopedRouteConfiguration> |
getParserForType() |
String |
getRouteConfigurationName()
The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an
RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated
with this scope.
|
com.google.protobuf.ByteString |
getRouteConfigurationNameBytes()
The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an
RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated
with this scope.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasKey()
The key to match against.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ScopedRouteConfiguration.Builder |
newBuilder() |
static ScopedRouteConfiguration.Builder |
newBuilder(ScopedRouteConfiguration prototype) |
ScopedRouteConfiguration.Builder |
newBuilderForType() |
protected ScopedRouteConfiguration.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static ScopedRouteConfiguration |
parseDelimitedFrom(InputStream input) |
static ScopedRouteConfiguration |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ScopedRouteConfiguration |
parseFrom(byte[] data) |
static ScopedRouteConfiguration |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ScopedRouteConfiguration |
parseFrom(ByteBuffer data) |
static ScopedRouteConfiguration |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ScopedRouteConfiguration |
parseFrom(com.google.protobuf.ByteString data) |
static ScopedRouteConfiguration |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ScopedRouteConfiguration |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ScopedRouteConfiguration |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ScopedRouteConfiguration |
parseFrom(InputStream input) |
static ScopedRouteConfiguration |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ScopedRouteConfiguration> |
parser() |
ScopedRouteConfiguration.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int ON_DEMAND_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final int ROUTE_CONFIGURATION_NAME_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public boolean getOnDemand()
Whether the RouteConfiguration should be loaded on demand.
bool on_demand = 4;getOnDemand in interface ScopedRouteConfigurationOrBuilderpublic String getName()
The name assigned to the routing scope.
string name = 1 [(.validate.rules) = { ... }getName in interface ScopedRouteConfigurationOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name assigned to the routing scope.
string name = 1 [(.validate.rules) = { ... }getNameBytes in interface ScopedRouteConfigurationOrBuilderpublic String getRouteConfigurationName()
The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated with this scope.
string route_configuration_name = 2 [(.validate.rules) = { ... }getRouteConfigurationName in interface ScopedRouteConfigurationOrBuilderpublic com.google.protobuf.ByteString getRouteConfigurationNameBytes()
The resource name to use for a :ref:`envoy_api_msg_service.discovery.v4alpha.DiscoveryRequest` to an RDS server to fetch the :ref:`envoy_api_msg_config.route.v4alpha.RouteConfiguration` associated with this scope.
string route_configuration_name = 2 [(.validate.rules) = { ... }getRouteConfigurationNameBytes in interface ScopedRouteConfigurationOrBuilderpublic boolean hasKey()
The key to match against.
.envoy.config.route.v4alpha.ScopedRouteConfiguration.Key key = 3 [(.validate.rules) = { ... }hasKey in interface ScopedRouteConfigurationOrBuilderpublic ScopedRouteConfiguration.Key getKey()
The key to match against.
.envoy.config.route.v4alpha.ScopedRouteConfiguration.Key key = 3 [(.validate.rules) = { ... }getKey in interface ScopedRouteConfigurationOrBuilderpublic ScopedRouteConfiguration.KeyOrBuilder getKeyOrBuilder()
The key to match against.
.envoy.config.route.v4alpha.ScopedRouteConfiguration.Key key = 3 [(.validate.rules) = { ... }getKeyOrBuilder in interface ScopedRouteConfigurationOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ScopedRouteConfiguration parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ScopedRouteConfiguration parseFrom(InputStream input) throws IOException
IOExceptionpublic static ScopedRouteConfiguration parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ScopedRouteConfiguration parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ScopedRouteConfiguration parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ScopedRouteConfiguration parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ScopedRouteConfiguration parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ScopedRouteConfiguration.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ScopedRouteConfiguration.Builder newBuilder()
public static ScopedRouteConfiguration.Builder newBuilder(ScopedRouteConfiguration prototype)
public ScopedRouteConfiguration.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ScopedRouteConfiguration.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ScopedRouteConfiguration getDefaultInstance()
public static com.google.protobuf.Parser<ScopedRouteConfiguration> parser()
public com.google.protobuf.Parser<ScopedRouteConfiguration> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ScopedRouteConfiguration getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.