Metadata¶
type.metadata.v2.MetadataKey¶
[type.metadata.v2.MetadataKey proto]
MetadataKey provides a general interface using key and path to retrieve value from Metadata.
For example, for the following Metadata:
filter_metadata:
envoy.xxx:
prop:
foo: bar
xyz:
hello: envoy
The following MetadataKey will retrieve a string value “bar” from the Metadata.
key: envoy.xxx
path:
- key: prop
- key: foo
{
"key": "...",
"path": []
}
- key
(string, REQUIRED) The key name of Metadata to retrieve the Struct from the metadata. Typically, it represents a builtin subsystem or custom extension.
- path
(repeated type.metadata.v2.MetadataKey.PathSegment, REQUIRED) The path to retrieve the Value from the Struct. It can be a prefix or a full path, e.g.
[prop, xyz]
for a struct or[prop, foo]
for a string in the example, which depends on the particular scenario.Note: Due to that only the key type segment is supported, the path can not specify a list unless the list is the last segment.
type.metadata.v2.MetadataKey.PathSegment¶
[type.metadata.v2.MetadataKey.PathSegment proto]
Specifies the segment in a path to retrieve value from Metadata. Currently it is only supported to specify the key, i.e. field name, as one segment of a path.
{
"key": "..."
}
- key
(string, REQUIRED) If specified, use the key to retrieve the value in a Struct.
type.metadata.v2.MetadataKind¶
[type.metadata.v2.MetadataKind proto]
Describes what kind of metadata.
{
"request": "{...}",
"route": "{...}",
"cluster": "{...}",
"host": "{...}"
}
- request
(type.metadata.v2.MetadataKind.Request) Request kind of metadata.
- route
(type.metadata.v2.MetadataKind.Route) Route kind of metadata.
- cluster
(type.metadata.v2.MetadataKind.Cluster) Cluster kind of metadata.
- host
(type.metadata.v2.MetadataKind.Host) Host kind of metadata.
type.metadata.v2.MetadataKind.Request¶
[type.metadata.v2.MetadataKind.Request proto]
Represents dynamic metadata associated with the request.
{}
type.metadata.v2.MetadataKind.Route¶
[type.metadata.v2.MetadataKind.Route proto]
Represents metadata from the route.
{}
type.metadata.v2.MetadataKind.Cluster¶
[type.metadata.v2.MetadataKind.Cluster proto]
Represents metadata from the upstream cluster.
{}
type.metadata.v2.MetadataKind.Host¶
[type.metadata.v2.MetadataKind.Host proto]
Represents metadata from the upstream host.
{}