public static final class ResourceLocator.Directive extends com.google.protobuf.GeneratedMessageV3 implements ResourceLocator.DirectiveOrBuilder
Directives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved. For example, they may provide alternative resource locators for when primary resolution fails. Directives are not part of resource names and do not appear in a xDS transport discovery request. When encoding to URIs, directives take the form: <directive name>=<string representation of directive value> For example, we can have alt=xdstp://foo/bar or entry=some%20thing. Each directive value type may have its own string encoding, in the case of ResourceLocator there is a recursive URI encoding. Percent encoding applies to the URI encoding of the directive value. Multiple directives are comma-separated, so the reserved characters that require percent encoding in a directive value are [',', '#', '[', ']', '%']. These are the RFC3986 fragment reserved characters with the addition of the xDS scheme specific ','. See https://tools.ietf.org/html/rfc3986#page-49 for further details on URI ABNF and reserved characters.Protobuf type
xds.core.v3.ResourceLocator.Directive| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceLocator.Directive.Builder
Directives provide information to data-plane load balancers on how xDS
resource names are to be interpreted and potentially further resolved.
|
static class |
ResourceLocator.Directive.DirectiveCase |
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 |
ALT_FIELD_NUMBER |
static int |
ENTRY_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ResourceLocator |
getAlt()
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocatorOrBuilder |
getAltOrBuilder()
An alternative resource locator for fallback if the resource is
unavailable.
|
static ResourceLocator.Directive |
getDefaultInstance() |
ResourceLocator.Directive |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
ResourceLocator.Directive.DirectiveCase |
getDirectiveCase() |
String |
getEntry()
List collections support inlining of resources via the entry field in
Resource.
|
com.google.protobuf.ByteString |
getEntryBytes()
List collections support inlining of resources via the entry field in
Resource.
|
com.google.protobuf.Parser<ResourceLocator.Directive> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasAlt()
An alternative resource locator for fallback if the resource is
unavailable.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ResourceLocator.Directive.Builder |
newBuilder() |
static ResourceLocator.Directive.Builder |
newBuilder(ResourceLocator.Directive prototype) |
ResourceLocator.Directive.Builder |
newBuilderForType() |
protected ResourceLocator.Directive.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static ResourceLocator.Directive |
parseDelimitedFrom(InputStream input) |
static ResourceLocator.Directive |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ResourceLocator.Directive |
parseFrom(byte[] data) |
static ResourceLocator.Directive |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ResourceLocator.Directive |
parseFrom(ByteBuffer data) |
static ResourceLocator.Directive |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ResourceLocator.Directive |
parseFrom(com.google.protobuf.ByteString data) |
static ResourceLocator.Directive |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ResourceLocator.Directive |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ResourceLocator.Directive |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ResourceLocator.Directive |
parseFrom(InputStream input) |
static ResourceLocator.Directive |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ResourceLocator.Directive> |
parser() |
ResourceLocator.Directive.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 ALT_FIELD_NUMBER
public static final int ENTRY_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 ResourceLocator.Directive.DirectiveCase getDirectiveCase()
getDirectiveCase in interface ResourceLocator.DirectiveOrBuilderpublic boolean hasAlt()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;hasAlt in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocator getAlt()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;getAlt in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocatorOrBuilder getAltOrBuilder()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;getAltOrBuilder in interface ResourceLocator.DirectiveOrBuilderpublic String getEntry()
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }getEntry in interface ResourceLocator.DirectiveOrBuilderpublic com.google.protobuf.ByteString getEntryBytes()
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }getEntryBytes in interface ResourceLocator.DirectiveOrBuilderpublic 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 ResourceLocator.Directive parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ResourceLocator.Directive parseFrom(InputStream input) throws IOException
IOExceptionpublic static ResourceLocator.Directive parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ResourceLocator.Directive parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ResourceLocator.Directive parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ResourceLocator.Directive parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ResourceLocator.Directive parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ResourceLocator.Directive.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ResourceLocator.Directive.Builder newBuilder()
public static ResourceLocator.Directive.Builder newBuilder(ResourceLocator.Directive prototype)
public ResourceLocator.Directive.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ResourceLocator.Directive.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ResourceLocator.Directive getDefaultInstance()
public static com.google.protobuf.Parser<ResourceLocator.Directive> parser()
public com.google.protobuf.Parser<ResourceLocator.Directive> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ResourceLocator.Directive getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.