Metadata (proto)
type.metadata.v3.MetadataKey
[type.metadata.v3.MetadataKey proto]
MetadataKey provides a way to retrieve values from
Metadata using a key
and a path
.
For example, consider the following Metadata:
filter_metadata:
envoy.xxx:
prop:
foo: bar
xyz:
hello: envoy
The following MetadataKey would retrieve the string value “bar” from the Metadata:
key: envoy.xxx
path:
- key: prop
- key: foo
{
"key": ...,
"path": []
}
- key
(string, REQUIRED) The key name of the Metadata from which to retrieve the Struct. This typically represents a builtin subsystem or custom extension.
- path
(repeated type.metadata.v3.MetadataKey.PathSegment, REQUIRED) The path used to retrieve a specific Value from the Struct. This can be either a prefix or a full path, depending on the use case. For example,
[prop, xyz]
would retrieve a struct or[prop, foo]
would retrieve a string in the example above.Note
Since only key-type segments are supported, a path cannot specify a list unless the list is the last segment.
type.metadata.v3.MetadataKey.PathSegment
[type.metadata.v3.MetadataKey.PathSegment proto]
Specifies a segment in a path for retrieving values from Metadata. Currently, only key-based segments (field names) are supported.
{
"key": ...
}
- key
(string, REQUIRED) If specified, use this key to retrieve the value in a Struct.
type.metadata.v3.MetadataKind
[type.metadata.v3.MetadataKind proto]
Describes different types of metadata sources.
{
"request": {...},
"route": {...},
"cluster": {...},
"host": {...}
}
- request
(type.metadata.v3.MetadataKind.Request) Request kind of metadata.
- route
(type.metadata.v3.MetadataKind.Route) Route kind of metadata.
- cluster
(type.metadata.v3.MetadataKind.Cluster) Cluster kind of metadata.
- host
(type.metadata.v3.MetadataKind.Host) Host kind of metadata.
type.metadata.v3.MetadataKind.Request
[type.metadata.v3.MetadataKind.Request proto]
Represents dynamic metadata associated with the request.
type.metadata.v3.MetadataKind.Route
[type.metadata.v3.MetadataKind.Route proto]
Represents metadata from the route.
type.metadata.v3.MetadataKind.Cluster
[type.metadata.v3.MetadataKind.Cluster proto]
Represents metadata from the upstream cluster.
type.metadata.v3.MetadataKind.Host
[type.metadata.v3.MetadataKind.Host proto]
Represents metadata from the upstream host.