@@ -14,10 +14,10 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
14
14
15
15
// [#protodoc-title: Metadata]
16
16
17
- // MetadataKey provides a general interface using ``key`` and ``path`` to retrieve value from
18
- // :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>`.
17
+ // MetadataKey provides a way to retrieve values from
18
+ // :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a ``key`` and a ``path`` .
19
19
//
20
- // For example, for the following Metadata:
20
+ // For example, consider the following Metadata:
21
21
//
22
22
// .. code-block:: yaml
23
23
//
@@ -28,7 +28,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
28
28
// xyz:
29
29
// hello: envoy
30
30
//
31
- // The following MetadataKey will retrieve a string value "bar" from the Metadata.
31
+ // The following MetadataKey would retrieve the string value "bar" from the Metadata:
32
32
//
33
33
// .. code-block:: yaml
34
34
//
@@ -40,34 +40,36 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
40
40
message MetadataKey {
41
41
option (udpa.annotations.versioning ).previous_message_type = "envoy.type.metadata.v2.MetadataKey" ;
42
42
43
- // Specifies the segment in a path to retrieve value from Metadata.
44
- // Currently it is only supported to specify the key, i.e. field name, as one segment of a path .
43
+ // Specifies a segment in a path for retrieving values from Metadata.
44
+ // Currently, only key-based segments ( field names) are supported .
45
45
message PathSegment {
46
46
option (udpa.annotations.versioning ).previous_message_type =
47
47
"envoy.type.metadata.v2.MetadataKey.PathSegment" ;
48
48
49
49
oneof segment {
50
50
option (validate.required ) = true ;
51
51
52
- // If specified, use the key to retrieve the value in a Struct.
52
+ // If specified, use this key to retrieve the value in a Struct.
53
53
string key = 1 [(validate.rules ).string = {min_len : 1 }];
54
54
}
55
55
}
56
56
57
- // The key name of Metadata to retrieve the Struct from the metadata .
58
- // Typically, it represents a builtin subsystem or custom extension.
57
+ // The key name of the Metadata from which to retrieve the Struct.
58
+ // This typically represents a builtin subsystem or custom extension.
59
59
string key = 1 [(validate.rules ).string = {min_len : 1 }];
60
60
61
- // The path to retrieve the Value from the Struct. It can be a prefix or a full path,
62
- // e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example,
63
- // which depends on the particular scenario.
61
+ // The path used to retrieve a specific Value from the Struct.
62
+ // This can be either a prefix or a full path, depending on the use case.
63
+ // For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string
64
+ // in the example above.
64
65
//
65
- // Note: Due to that only the key type segment is supported, the path can not specify a list
66
- // unless the list is the last segment.
66
+ // .. note::
67
+ // Since only key-type segments are supported, a path cannot specify a list
68
+ // unless the list is the last segment.
67
69
repeated PathSegment path = 2 [(validate.rules ).repeated = {min_items : 1 }];
68
70
}
69
71
70
- // Describes what kind of metadata.
72
+ // Describes different types of metadata sources .
71
73
message MetadataKind {
72
74
option (udpa.annotations.versioning ).previous_message_type =
73
75
"envoy.type.metadata.v2.MetadataKind" ;
0 commit comments