api, metadata: use map type for Container.Extensions

To allow for updating extensions without collisions, we have moved to
using a map type that can be explicitly selected via the field path for
updates. This ensures that multiple parties can operate on their
extensions without stepping on each other's toes or incurring an
inordinate number of round trips.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-09-08 14:51:30 -07:00
parent 3552ce5688
commit f7d31e2be4
9 changed files with 349 additions and 123 deletions

View File

@@ -190,7 +190,7 @@ file {
number: 10
label: LABEL_REPEATED
type: TYPE_MESSAGE
type_name: ".google.protobuf.Any"
type_name: ".containerd.services.containers.v1.Container.ExtensionsEntry"
options {
65001: 0
}
@@ -234,6 +234,27 @@ file {
json_name: "options"
}
}
nested_type {
name: "ExtensionsEntry"
field {
name: "key"
number: 1
label: LABEL_OPTIONAL
type: TYPE_STRING
json_name: "key"
}
field {
name: "value"
number: 2
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".google.protobuf.Any"
json_name: "value"
}
options {
map_entry: true
}
}
}
message_type {
name: "GetContainerRequest"