public final class Metadata extends com.google.protobuf.GeneratedMessageV3 implements MetadataOrBuilder
Metadata provides additional inputs to filters based on matched listeners,
filter chains, routes and endpoints. It is structured as a map, usually from
filter name (in reverse DNS format) to metadata specific to the filter. Metadata
key-values for a filter are merged as connection and request handling occurs,
with later values for the same key overriding earlier values.
An example use of metadata is providing additional values to
http_connection_manager in the envoy.http_connection_manager.access_log
namespace.
Another example use of metadata is to per service config info in cluster metadata, which may get
consumed by multiple filters.
For load balancing, Metadata provides a means to subset cluster endpoints.
Endpoints have a Metadata object associated and routes contain a Metadata
object to match against. There are some well defined metadata used today for
this purpose:
* ``{"envoy.lb": {"canary": <bool> }}`` This indicates the canary status of an
endpoint and is also used during header processing
(x-envoy-upstream-canary) and for stats purposes.
[#next-major-version: move to type/metadata/v2]
Protobuf type envoy.config.core.v4alpha.Metadata| Modifier and Type | Class and Description |
|---|---|
static class |
Metadata.Builder
Metadata provides additional inputs to filters based on matched listeners,
filter chains, routes and endpoints.
|
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 |
FILTER_METADATA_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFilterMetadata(String key)
Key is the reverse DNS filter name, e.g. com.acme.widget.
|
boolean |
equals(Object obj) |
static Metadata |
getDefaultInstance() |
Metadata |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Map<String,com.google.protobuf.Struct> |
getFilterMetadata()
Deprecated.
|
int |
getFilterMetadataCount()
Key is the reverse DNS filter name, e.g. com.acme.widget.
|
Map<String,com.google.protobuf.Struct> |
getFilterMetadataMap()
Key is the reverse DNS filter name, e.g. com.acme.widget.
|
com.google.protobuf.Struct |
getFilterMetadataOrDefault(String key,
com.google.protobuf.Struct defaultValue)
Key is the reverse DNS filter name, e.g. com.acme.widget.
|
com.google.protobuf.Struct |
getFilterMetadataOrThrow(String key)
Key is the reverse DNS filter name, e.g. com.acme.widget.
|
com.google.protobuf.Parser<Metadata> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static Metadata.Builder |
newBuilder() |
static Metadata.Builder |
newBuilder(Metadata prototype) |
Metadata.Builder |
newBuilderForType() |
protected Metadata.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Metadata |
parseDelimitedFrom(InputStream input) |
static Metadata |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Metadata |
parseFrom(byte[] data) |
static Metadata |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Metadata |
parseFrom(ByteBuffer data) |
static Metadata |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Metadata |
parseFrom(com.google.protobuf.ByteString data) |
static Metadata |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Metadata |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Metadata |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Metadata |
parseFrom(InputStream input) |
static Metadata |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Metadata> |
parser() |
Metadata.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, 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 FILTER_METADATA_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.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getFilterMetadataCount()
MetadataOrBuilderKey is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* namespace is reserved for Envoy's built-in filters.
map<string, .google.protobuf.Struct> filter_metadata = 1;getFilterMetadataCount in interface MetadataOrBuilderpublic boolean containsFilterMetadata(String key)
Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* namespace is reserved for Envoy's built-in filters.
map<string, .google.protobuf.Struct> filter_metadata = 1;containsFilterMetadata in interface MetadataOrBuilder@Deprecated public Map<String,com.google.protobuf.Struct> getFilterMetadata()
getFilterMetadataMap() instead.getFilterMetadata in interface MetadataOrBuilderpublic Map<String,com.google.protobuf.Struct> getFilterMetadataMap()
Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* namespace is reserved for Envoy's built-in filters.
map<string, .google.protobuf.Struct> filter_metadata = 1;getFilterMetadataMap in interface MetadataOrBuilderpublic com.google.protobuf.Struct getFilterMetadataOrDefault(String key, com.google.protobuf.Struct defaultValue)
Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* namespace is reserved for Envoy's built-in filters.
map<string, .google.protobuf.Struct> filter_metadata = 1;getFilterMetadataOrDefault in interface MetadataOrBuilderpublic com.google.protobuf.Struct getFilterMetadataOrThrow(String key)
Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* namespace is reserved for Envoy's built-in filters.
map<string, .google.protobuf.Struct> filter_metadata = 1;getFilterMetadataOrThrow in interface MetadataOrBuilderpublic 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 Metadata parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Metadata parseFrom(InputStream input) throws IOException
IOExceptionpublic static Metadata parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Metadata parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Metadata parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Metadata parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Metadata parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Metadata.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Metadata.Builder newBuilder()
public static Metadata.Builder newBuilder(Metadata prototype)
public Metadata.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Metadata.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Metadata getDefaultInstance()
public static com.google.protobuf.Parser<Metadata> parser()
public com.google.protobuf.Parser<Metadata> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Metadata getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.