From 3defa1229beed8b664b8c18b83d3806d6405ea26 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 30 Jan 2026 18:17:45 -0800 Subject: [PATCH 1/4] Use buf to format proto files Signed-off-by: Maksym Pavlenko --- Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 906265d321f39..5a258adf05c69 100644 --- a/Makefile +++ b/Makefile @@ -189,16 +189,15 @@ protos: bin/protoc-gen-go-fieldpath bin/go-buildtag @test -z "$$(git status --short | grep "api/next.txtpb" | tee /dev/stderr)" || \ $(GO) mod edit -replace=github.com/containerd/containerd/api=./api -check-protos: protos ## check if protobufs needs to be generated again +check-protos: ## check if protobufs needs to be generated again @echo "$(WHALE) $@" - @test -z "$$(git status --short | grep ".pb.go" | tee /dev/stderr)" || \ - ((git diff | cat) && \ - (echo "$(ONI) please run 'make protos' when making changes to proto files" && false)) + @(cd api && buf format --diff --exit-code --exclude-path vendor \ + $(if $(GITHUB_ACTIONS),--error-format github-actions)) || \ + (echo "$(ONI) please run 'make protos' when making changes to proto files" && false) -proto-fmt: ## check format of proto files +proto-fmt: ## format proto files @echo "$(WHALE) $@" - @test -z "$$(find . -path ./vendor -prune -o -path ./protobuf/google/rpc -prune -o -name '*.proto' -type f -exec grep -Hn -e "^ " {} \; | tee /dev/stderr)" || \ - (echo "$(ONI) please indent proto files with tabs only" && false) + @cd api && buf format --write --exclude-path vendor build: ## build the go packages @echo "$(WHALE) $@" From 2a87c9d7d29a5d947fa671a0d7b52f449835fd11 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 30 Jan 2026 18:19:19 -0800 Subject: [PATCH 2/4] Add .editorconfig for proto files Signed-off-by: Maksym Pavlenko --- api/.editorconfig | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 api/.editorconfig diff --git a/api/.editorconfig b/api/.editorconfig new file mode 100644 index 0000000000000..5efb22279cc90 --- /dev/null +++ b/api/.editorconfig @@ -0,0 +1,4 @@ +[*.proto] +indent_size = 2 +indent_style = space +insert_final_newline = true From ca1c5b2d3db8c620c26ab9674b7ccb9a4b023a63 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Fri, 30 Jan 2026 18:43:12 -0800 Subject: [PATCH 3/4] Reformat and revendor proto files Signed-off-by: Maksym Pavlenko --- api/events/container.proto | 44 +- api/events/content.proto | 26 +- api/events/image.proto | 30 +- api/events/namespace.proto | 30 +- api/events/sandbox.proto | 30 +- api/events/snapshot.proto | 36 +- api/events/task.proto | 90 ++-- api/runtime/sandbox/v1/sandbox.proto | 127 +++-- api/runtime/task/v2/shim.proto | 201 ++++---- api/runtime/task/v3/shim.proto | 201 ++++---- api/services/containers/v1/containers.proto | 216 ++++---- api/services/content/v1/content.proto | 485 +++++++++--------- api/services/diff/v1/diff.proto | 114 ++-- api/services/events/v1/events.proto | 72 +-- api/services/images/v1/images.proto | 164 +++--- .../introspection/v1/introspection.proto | 188 +++---- api/services/leases/v1/leases.proto | 106 ++-- api/services/mounts/v1/mounts.proto | 57 +- api/services/namespaces/v1/namespace.proto | 88 ++-- api/services/sandbox/v1/sandbox.proto | 182 ++++--- api/services/snapshots/v1/snapshots.proto | 192 +++---- api/services/streaming/v1/streaming.proto | 24 +- api/services/tasks/v1/tasks.proto | 217 ++++---- api/services/transfer/v1/transfer.proto | 32 +- api/services/ttrpc/events/v1/events.proto | 36 +- api/services/version/v1/version.proto | 26 +- api/types/descriptor.proto | 28 +- api/types/event.proto | 32 +- api/types/fieldpath.proto | 4 +- api/types/introspection.proto | 48 +- api/types/metrics.proto | 26 +- api/types/mount.proto | 54 +- api/types/platform.proto | 28 +- api/types/runc/options/oci.proto | 98 ++-- api/types/runtimeoptions/v1/api.proto | 16 +- api/types/sandbox.proto | 69 ++- api/types/task/task.proto | 66 +-- api/types/transfer/imagestore.proto | 104 ++-- api/types/transfer/importexport.proto | 66 +-- api/types/transfer/progress.proto | 32 +- api/types/transfer/registry.proto | 110 ++-- api/types/transfer/streaming.proto | 24 +- .../containerd/api/events/container.proto | 44 +- .../containerd/api/events/content.proto | 26 +- .../containerd/api/events/image.proto | 30 +- .../containerd/api/events/namespace.proto | 30 +- .../containerd/api/events/sandbox.proto | 30 +- .../containerd/api/events/snapshot.proto | 36 +- .../containerd/api/events/task.proto | 90 ++-- .../api/runtime/sandbox/v1/sandbox.proto | 127 +++-- .../containerd/api/runtime/task/v2/shim.proto | 201 ++++---- .../containerd/api/runtime/task/v3/shim.proto | 201 ++++---- .../services/containers/v1/containers.proto | 216 ++++---- .../api/services/content/v1/content.proto | 485 +++++++++--------- .../api/services/diff/v1/diff.proto | 114 ++-- .../api/services/events/v1/events.proto | 72 +-- .../api/services/images/v1/images.proto | 164 +++--- .../introspection/v1/introspection.proto | 188 +++---- .../api/services/leases/v1/leases.proto | 106 ++-- .../api/services/mounts/v1/mounts.proto | 57 +- .../services/namespaces/v1/namespace.proto | 88 ++-- .../api/services/sandbox/v1/sandbox.proto | 182 ++++--- .../api/services/snapshots/v1/snapshots.proto | 192 +++---- .../api/services/streaming/v1/streaming.proto | 24 +- .../api/services/tasks/v1/tasks.proto | 217 ++++---- .../api/services/transfer/v1/transfer.proto | 32 +- .../api/services/ttrpc/events/v1/events.proto | 36 +- .../api/services/version/v1/version.proto | 26 +- .../containerd/api/types/descriptor.proto | 28 +- .../containerd/api/types/event.proto | 32 +- .../containerd/api/types/fieldpath.proto | 4 +- .../containerd/api/types/introspection.proto | 48 +- .../containerd/api/types/metrics.proto | 26 +- .../containerd/api/types/mount.proto | 54 +- .../containerd/api/types/platform.proto | 28 +- .../api/types/runc/options/oci.proto | 98 ++-- .../api/types/runtimeoptions/v1/api.proto | 16 +- .../containerd/api/types/sandbox.proto | 69 ++- .../containerd/api/types/task/task.proto | 66 +-- .../api/types/transfer/imagestore.proto | 104 ++-- .../api/types/transfer/importexport.proto | 66 +-- .../api/types/transfer/progress.proto | 32 +- .../api/types/transfer/registry.proto | 110 ++-- .../api/types/transfer/streaming.proto | 24 +- 84 files changed, 3810 insertions(+), 3828 deletions(-) diff --git a/api/events/container.proto b/api/events/container.proto index 306a580958e6a..6592c495f107f 100644 --- a/api/events/container.proto +++ b/api/events/container.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -25,22 +25,22 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ContainerCreate { - string id = 1; - string image = 2; - message Runtime { - string name = 1; - google.protobuf.Any options = 2; - } - Runtime runtime = 3; + string id = 1; + string image = 2; + message Runtime { + string name = 1; + google.protobuf.Any options = 2; + } + Runtime runtime = 3; } message ContainerUpdate { - string id = 1; - string image = 2; - map labels = 3; - string snapshot_key = 4; + string id = 1; + string image = 2; + map labels = 3; + string snapshot_key = 4; } message ContainerDelete { - string id = 1; + string id = 1; } diff --git a/api/events/content.proto b/api/events/content.proto index 3feb58fe6972a..13e4d7fb8ab7d 100644 --- a/api/events/content.proto +++ b/api/events/content.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,10 +24,10 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ContentCreate { - string digest = 1; - int64 size = 2; + string digest = 1; + int64 size = 2; } message ContentDelete { - string digest = 1; + string digest = 1; } diff --git a/api/events/image.proto b/api/events/image.proto index e35049808bfd9..a6baeb643a8d4 100644 --- a/api/events/image.proto +++ b/api/events/image.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,15 +24,15 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ImageCreate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message ImageUpdate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message ImageDelete { - string name = 1; + string name = 1; } diff --git a/api/events/namespace.proto b/api/events/namespace.proto index 8f4bc2f341519..89a3d20cc8cae 100644 --- a/api/events/namespace.proto +++ b/api/events/namespace.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,15 +24,15 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message NamespaceCreate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message NamespaceUpdate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message NamespaceDelete { - string name = 1; + string name = 1; } diff --git a/api/events/sandbox.proto b/api/events/sandbox.proto index f1c5195e5a721..f70fa7e3821a3 100644 --- a/api/events/sandbox.proto +++ b/api/events/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,15 +23,15 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; message SandboxCreate { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxStart { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxExit { - string sandbox_id = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + string sandbox_id = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } diff --git a/api/events/snapshot.proto b/api/events/snapshot.proto index 08419bfa6a264..75be997394508 100644 --- a/api/events/snapshot.proto +++ b/api/events/snapshot.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,18 +24,18 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message SnapshotPrepare { - string key = 1; - string parent = 2; - string snapshotter = 5; + string key = 1; + string parent = 2; + string snapshotter = 5; } message SnapshotCommit { - string key = 1; - string name = 2; - string snapshotter = 5; + string key = 1; + string name = 2; + string snapshotter = 5; } message SnapshotRemove { - string key = 1; - string snapshotter = 5; + string key = 1; + string snapshotter = 5; } diff --git a/api/events/task.proto b/api/events/task.proto index 68453fff0eb95..90c55939d81ed 100644 --- a/api/events/task.proto +++ b/api/events/task.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -19,75 +19,75 @@ syntax = "proto3"; package containerd.events; import "google/protobuf/timestamp.proto"; -import "types/mount.proto"; import "types/fieldpath.proto"; +import "types/mount.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message TaskCreate { - string container_id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - TaskIO io = 4; - string checkpoint = 5; - uint32 pid = 6; + string container_id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + TaskIO io = 4; + string checkpoint = 5; + uint32 pid = 6; } message TaskStart { - string container_id = 1; - uint32 pid = 2; + string container_id = 1; + uint32 pid = 2; } message TaskDelete { - string container_id = 1; - uint32 pid = 2; - uint32 exit_status = 3; - google.protobuf.Timestamp exited_at = 4; - // id is the specific exec. By default if omitted will be `""` thus matches - // the init exec of the task matching `container_id`. - string id = 5; + string container_id = 1; + uint32 pid = 2; + uint32 exit_status = 3; + google.protobuf.Timestamp exited_at = 4; + // id is the specific exec. By default if omitted will be `""` thus matches + // the init exec of the task matching `container_id`. + string id = 5; } message TaskIO { - string stdin = 1; - string stdout = 2; - string stderr = 3; - bool terminal = 4; + string stdin = 1; + string stdout = 2; + string stderr = 3; + bool terminal = 4; } message TaskExit { - string container_id = 1; - string id = 2; - uint32 pid = 3; - uint32 exit_status = 4; - google.protobuf.Timestamp exited_at = 5; + string container_id = 1; + string id = 2; + uint32 pid = 3; + uint32 exit_status = 4; + google.protobuf.Timestamp exited_at = 5; } message TaskOOM { - string container_id = 1; + string container_id = 1; } message TaskExecAdded { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message TaskExecStarted { - string container_id = 1; - string exec_id = 2; - uint32 pid = 3; + string container_id = 1; + string exec_id = 2; + uint32 pid = 3; } message TaskPaused { - string container_id = 1; + string container_id = 1; } message TaskResumed { - string container_id = 1; + string container_id = 1; } message TaskCheckpointed { - string container_id = 1; - string checkpoint = 2; + string container_id = 1; + string checkpoint = 2; } diff --git a/api/runtime/sandbox/v1/sandbox.proto b/api/runtime/sandbox/v1/sandbox.proto index b917111182fe3..3d31ae8734934 100644 --- a/api/runtime/sandbox/v1/sandbox.proto +++ b/api/runtime/sandbox/v1/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -20,10 +20,9 @@ package containerd.runtime.sandbox.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; - +import "types/metrics.proto"; import "types/mount.proto"; import "types/platform.proto"; -import "types/metrics.proto"; option go_package = "github.com/containerd/containerd/api/runtime/sandbox/v1;sandbox"; @@ -31,119 +30,119 @@ option go_package = "github.com/containerd/containerd/api/runtime/sandbox/v1;san // A typical example of sandbox is microVM or pause container - an entity that groups containers and/or // holds resources relevant for this group. service Sandbox { - // CreateSandbox will be called right after sandbox shim instance launched. - // It is a good place to initialize sandbox environment. - rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); + // CreateSandbox will be called right after sandbox shim instance launched. + // It is a good place to initialize sandbox environment. + rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); - // StartSandbox will start a previously created sandbox. - rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); + // StartSandbox will start a previously created sandbox. + rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); - // Platform queries the platform the sandbox is going to run containers on. - // containerd will use this to generate a proper OCI spec. - rpc Platform(PlatformRequest) returns (PlatformResponse); + // Platform queries the platform the sandbox is going to run containers on. + // containerd will use this to generate a proper OCI spec. + rpc Platform(PlatformRequest) returns (PlatformResponse); - // StopSandbox will stop existing sandbox instance - rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); + // StopSandbox will stop existing sandbox instance + rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); - // WaitSandbox blocks until sandbox exits. - rpc WaitSandbox(WaitSandboxRequest) returns (WaitSandboxResponse); + // WaitSandbox blocks until sandbox exits. + rpc WaitSandbox(WaitSandboxRequest) returns (WaitSandboxResponse); - // SandboxStatus will return current status of the running sandbox instance - rpc SandboxStatus(SandboxStatusRequest) returns (SandboxStatusResponse); + // SandboxStatus will return current status of the running sandbox instance + rpc SandboxStatus(SandboxStatusRequest) returns (SandboxStatusResponse); - // PingSandbox is a lightweight API call to check whether sandbox alive. - rpc PingSandbox(PingRequest) returns (PingResponse); + // PingSandbox is a lightweight API call to check whether sandbox alive. + rpc PingSandbox(PingRequest) returns (PingResponse); - // ShutdownSandbox must shutdown shim instance. - rpc ShutdownSandbox(ShutdownSandboxRequest) returns (ShutdownSandboxResponse); + // ShutdownSandbox must shutdown shim instance. + rpc ShutdownSandbox(ShutdownSandboxRequest) returns (ShutdownSandboxResponse); - // SandboxMetrics retrieves metrics about a sandbox instance. - rpc SandboxMetrics(SandboxMetricsRequest) returns (SandboxMetricsResponse); + // SandboxMetrics retrieves metrics about a sandbox instance. + rpc SandboxMetrics(SandboxMetricsRequest) returns (SandboxMetricsResponse); } message CreateSandboxRequest { - string sandbox_id = 1; - string bundle_path = 2; - repeated containerd.types.Mount rootfs = 3; - google.protobuf.Any options = 4; - string netns_path = 5; - map annotations = 6; + string sandbox_id = 1; + string bundle_path = 2; + repeated containerd.types.Mount rootfs = 3; + google.protobuf.Any options = 4; + string netns_path = 5; + map annotations = 6; } message CreateSandboxResponse {} message StartSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StartSandboxResponse { - uint32 pid = 1; - google.protobuf.Timestamp created_at = 2; + uint32 pid = 1; + google.protobuf.Timestamp created_at = 2; } message PlatformRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message PlatformResponse { - containerd.types.Platform platform = 1; + containerd.types.Platform platform = 1; } message StopSandboxRequest { - string sandbox_id = 1; - uint32 timeout_secs = 2; + string sandbox_id = 1; + uint32 timeout_secs = 2; } message StopSandboxResponse {} message UpdateSandboxRequest { - string sandbox_id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string sandbox_id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message WaitSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message WaitSandboxResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message UpdateSandboxResponse {} message SandboxStatusRequest { - string sandbox_id = 1; - bool verbose = 2; + string sandbox_id = 1; + bool verbose = 2; } message SandboxStatusResponse { - string sandbox_id = 1; - uint32 pid = 2; - string state = 3; - map info = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp exited_at = 6; - google.protobuf.Any extra = 7; + string sandbox_id = 1; + uint32 pid = 2; + string state = 3; + map info = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp exited_at = 6; + google.protobuf.Any extra = 7; } message PingRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message PingResponse {} message ShutdownSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message ShutdownSandboxResponse {} message SandboxMetricsRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxMetricsResponse { - containerd.types.Metric metrics = 1; + containerd.types.Metric metrics = 1; } diff --git a/api/runtime/task/v2/shim.proto b/api/runtime/task/v2/shim.proto index 4035bca778344..6d9c36e03b5ff 100644 --- a/api/runtime/task/v2/shim.proto +++ b/api/runtime/task/v2/shim.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -31,171 +31,170 @@ option go_package = "github.com/containerd/containerd/api/runtime/task/v2;task"; // each container and allows reattaching to the IO and receiving the exit status // for the container processes. service Task { - rpc State(StateRequest) returns (StateResponse); - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - rpc Start(StartRequest) returns (StartResponse); - rpc Delete(DeleteRequest) returns (DeleteResponse); - rpc Pids(PidsRequest) returns (PidsResponse); - rpc Pause(PauseRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeRequest) returns (google.protobuf.Empty); - rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); - rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Wait(WaitRequest) returns (WaitResponse); - rpc Stats(StatsRequest) returns (StatsResponse); - rpc Connect(ConnectRequest) returns (ConnectResponse); - rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); + rpc State(StateRequest) returns (StateResponse); + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + rpc Start(StartRequest) returns (StartResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Pids(PidsRequest) returns (PidsResponse); + rpc Pause(PauseRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeRequest) returns (google.protobuf.Empty); + rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); + rpc Kill(KillRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Wait(WaitRequest) returns (WaitResponse); + rpc Stats(StatsRequest) returns (StatsResponse); + rpc Connect(ConnectRequest) returns (ConnectResponse); + rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); } message CreateTaskRequest { - string id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - bool terminal = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - string checkpoint = 8; - string parent_checkpoint = 9; - google.protobuf.Any options = 10; + string id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + bool terminal = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + string checkpoint = 8; + string parent_checkpoint = 9; + google.protobuf.Any options = 10; } message CreateTaskResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message DeleteResponse { - uint32 pid = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + uint32 pid = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } message ExecProcessRequest { - string id = 1; - string exec_id = 2; - bool terminal = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - google.protobuf.Any spec = 7; + string id = 1; + string exec_id = 2; + bool terminal = 3; + string stdin = 4; + string stdout = 5; + string stderr = 6; + google.protobuf.Any spec = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message StateRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StateResponse { - string id = 1; - string bundle = 2; - uint32 pid = 3; - containerd.v1.types.Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; - string exec_id = 11; + string id = 1; + string bundle = 2; + uint32 pid = 3; + containerd.v1.types.Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; + string exec_id = 11; } message KillRequest { - string id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message CloseIORequest { - string id = 1; - string exec_id = 2; - bool stdin = 3; + string id = 1; + string exec_id = 2; + bool stdin = 3; } message PidsRequest { - string id = 1; + string id = 1; } message PidsResponse { - repeated containerd.v1.types.ProcessInfo processes = 1; + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string id = 1; - string path = 2; - google.protobuf.Any options = 3; + string id = 1; + string path = 2; + google.protobuf.Any options = 3; } message UpdateTaskRequest { - string id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message StartRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message WaitRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message StatsRequest { - string id = 1; + string id = 1; } message StatsResponse { - google.protobuf.Any stats = 1; + google.protobuf.Any stats = 1; } message ConnectRequest { - string id = 1; + string id = 1; } message ConnectResponse { - uint32 shim_pid = 1; - uint32 task_pid = 2; - string version = 3; + uint32 shim_pid = 1; + uint32 task_pid = 2; + string version = 3; } message ShutdownRequest { - string id = 1; - bool now = 2; + string id = 1; + bool now = 2; } message PauseRequest { - string id = 1; + string id = 1; } message ResumeRequest { - string id = 1; + string id = 1; } diff --git a/api/runtime/task/v3/shim.proto b/api/runtime/task/v3/shim.proto index dc8297333c036..2dffd52db80ad 100644 --- a/api/runtime/task/v3/shim.proto +++ b/api/runtime/task/v3/shim.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -31,171 +31,170 @@ option go_package = "github.com/containerd/containerd/api/runtime/task/v3;task"; // each container and allows reattaching to the IO and receiving the exit status // for the container processes. service Task { - rpc State(StateRequest) returns (StateResponse); - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - rpc Start(StartRequest) returns (StartResponse); - rpc Delete(DeleteRequest) returns (DeleteResponse); - rpc Pids(PidsRequest) returns (PidsResponse); - rpc Pause(PauseRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeRequest) returns (google.protobuf.Empty); - rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); - rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Wait(WaitRequest) returns (WaitResponse); - rpc Stats(StatsRequest) returns (StatsResponse); - rpc Connect(ConnectRequest) returns (ConnectResponse); - rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); + rpc State(StateRequest) returns (StateResponse); + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + rpc Start(StartRequest) returns (StartResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Pids(PidsRequest) returns (PidsResponse); + rpc Pause(PauseRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeRequest) returns (google.protobuf.Empty); + rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); + rpc Kill(KillRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Wait(WaitRequest) returns (WaitResponse); + rpc Stats(StatsRequest) returns (StatsResponse); + rpc Connect(ConnectRequest) returns (ConnectResponse); + rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); } message CreateTaskRequest { - string id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - bool terminal = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - string checkpoint = 8; - string parent_checkpoint = 9; - google.protobuf.Any options = 10; + string id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + bool terminal = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + string checkpoint = 8; + string parent_checkpoint = 9; + google.protobuf.Any options = 10; } message CreateTaskResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message DeleteResponse { - uint32 pid = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + uint32 pid = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } message ExecProcessRequest { - string id = 1; - string exec_id = 2; - bool terminal = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - google.protobuf.Any spec = 7; + string id = 1; + string exec_id = 2; + bool terminal = 3; + string stdin = 4; + string stdout = 5; + string stderr = 6; + google.protobuf.Any spec = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message StateRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StateResponse { - string id = 1; - string bundle = 2; - uint32 pid = 3; - containerd.v1.types.Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; - string exec_id = 11; + string id = 1; + string bundle = 2; + uint32 pid = 3; + containerd.v1.types.Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; + string exec_id = 11; } message KillRequest { - string id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message CloseIORequest { - string id = 1; - string exec_id = 2; - bool stdin = 3; + string id = 1; + string exec_id = 2; + bool stdin = 3; } message PidsRequest { - string id = 1; + string id = 1; } message PidsResponse { - repeated containerd.v1.types.ProcessInfo processes = 1; + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string id = 1; - string path = 2; - google.protobuf.Any options = 3; + string id = 1; + string path = 2; + google.protobuf.Any options = 3; } message UpdateTaskRequest { - string id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message StartRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message WaitRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message StatsRequest { - string id = 1; + string id = 1; } message StatsResponse { - google.protobuf.Any stats = 1; + google.protobuf.Any stats = 1; } message ConnectRequest { - string id = 1; + string id = 1; } message ConnectResponse { - uint32 shim_pid = 1; - uint32 task_pid = 2; - string version = 3; + uint32 shim_pid = 1; + uint32 task_pid = 2; + string version = 3; } message ShutdownRequest { - string id = 1; - bool now = 2; + string id = 1; + bool now = 2; } message PauseRequest { - string id = 1; + string id = 1; } message ResumeRequest { - string id = 1; + string id = 1; } diff --git a/api/services/containers/v1/containers.proto b/api/services/containers/v1/containers.proto index 3de07ffbd6e6a..d2460bf05762c 100644 --- a/api/services/containers/v1/containers.proto +++ b/api/services/containers/v1/containers.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -42,114 +42,114 @@ option go_package = "github.com/containerd/containerd/api/services/containers/v1 // runtime, or changes as the "container" is started and stops, it probably // doesn't belong on this object. service Containers { - rpc Get(GetContainerRequest) returns (GetContainerResponse); - rpc List(ListContainersRequest) returns (ListContainersResponse); - rpc ListStream(ListContainersRequest) returns (stream ListContainerMessage); - rpc Create(CreateContainerRequest) returns (CreateContainerResponse); - rpc Update(UpdateContainerRequest) returns (UpdateContainerResponse); - rpc Delete(DeleteContainerRequest) returns (google.protobuf.Empty); + rpc Get(GetContainerRequest) returns (GetContainerResponse); + rpc List(ListContainersRequest) returns (ListContainersResponse); + rpc ListStream(ListContainersRequest) returns (stream ListContainerMessage); + rpc Create(CreateContainerRequest) returns (CreateContainerResponse); + rpc Update(UpdateContainerRequest) returns (UpdateContainerResponse); + rpc Delete(DeleteContainerRequest) returns (google.protobuf.Empty); } message Container { - // ID is the user-specified identifier. - // - // This field may not be updated. - string id = 1; - - // Labels provides an area to include arbitrary data on containers. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - // - // Note that to add a new value to this field, read the existing set and - // include the entire result in the update call. - map labels = 2; - - // Image contains the reference of the image used to build the - // specification and snapshots for running this container. - // - // If this field is updated, the spec and rootfs needed to updated, as well. - string image = 3; - - message Runtime { - // Name is the name of the runtime. - string name = 1; - // Options specify additional runtime initialization options. - google.protobuf.Any options = 2; - } - // Runtime specifies which runtime to use for executing this container. - Runtime runtime = 4; - - // Spec to be used when creating the container. This is runtime specific. - google.protobuf.Any spec = 5; - - // Snapshotter specifies the snapshotter name used for rootfs - string snapshotter = 6; - - // SnapshotKey specifies the snapshot key to use for the container's root - // filesystem. When starting a task from this container, a caller should - // look up the mounts from the snapshot service and include those on the - // task create request. - // - // Snapshots referenced in this field will not be garbage collected. - // - // This field is set to empty when the rootfs is not a snapshot. - // - // This field may be updated. - string snapshot_key = 7; - - // CreatedAt is the time the container was first created. - google.protobuf.Timestamp created_at = 8; - - // UpdatedAt is the last time the container was mutated. - google.protobuf.Timestamp updated_at = 9; - - // Extensions allow clients to provide zero or more blobs that are directly - // associated with the container. One may provide protobuf, json, or other - // encoding formats. The primary use of this is to further decorate the - // container object with fields that may be specific to a client integration. - // - // The key portion of this map should identify a "name" for the extension - // that should be unique against other extensions. When updating extension - // data, one should only update the specified extension using field paths - // to select a specific map key. - map extensions = 10; - - // Sandbox ID this container belongs to. - string sandbox = 11; + // ID is the user-specified identifier. + // + // This field may not be updated. + string id = 1; + + // Labels provides an area to include arbitrary data on containers. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + // + // Note that to add a new value to this field, read the existing set and + // include the entire result in the update call. + map labels = 2; + + // Image contains the reference of the image used to build the + // specification and snapshots for running this container. + // + // If this field is updated, the spec and rootfs needed to updated, as well. + string image = 3; + + message Runtime { + // Name is the name of the runtime. + string name = 1; + // Options specify additional runtime initialization options. + google.protobuf.Any options = 2; + } + // Runtime specifies which runtime to use for executing this container. + Runtime runtime = 4; + + // Spec to be used when creating the container. This is runtime specific. + google.protobuf.Any spec = 5; + + // Snapshotter specifies the snapshotter name used for rootfs + string snapshotter = 6; + + // SnapshotKey specifies the snapshot key to use for the container's root + // filesystem. When starting a task from this container, a caller should + // look up the mounts from the snapshot service and include those on the + // task create request. + // + // Snapshots referenced in this field will not be garbage collected. + // + // This field is set to empty when the rootfs is not a snapshot. + // + // This field may be updated. + string snapshot_key = 7; + + // CreatedAt is the time the container was first created. + google.protobuf.Timestamp created_at = 8; + + // UpdatedAt is the last time the container was mutated. + google.protobuf.Timestamp updated_at = 9; + + // Extensions allow clients to provide zero or more blobs that are directly + // associated with the container. One may provide protobuf, json, or other + // encoding formats. The primary use of this is to further decorate the + // container object with fields that may be specific to a client integration. + // + // The key portion of this map should identify a "name" for the extension + // that should be unique against other extensions. When updating extension + // data, one should only update the specified extension using field paths + // to select a specific map key. + map extensions = 10; + + // Sandbox ID this container belongs to. + string sandbox = 11; } message GetContainerRequest { - string id = 1; + string id = 1; } message GetContainerResponse { - Container container = 1; + Container container = 1; } message ListContainersRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, containers that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, containers that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListContainersResponse { - repeated Container containers = 1; + repeated Container containers = 1; } message CreateContainerRequest { - Container container = 1; + Container container = 1; } message CreateContainerResponse { - Container container = 1; + Container container = 1; } // UpdateContainerRequest updates the metadata on one or more container. @@ -158,24 +158,24 @@ message CreateContainerResponse { // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateContainerRequest { - // Container provides the target values, as declared by the mask, for the update. - // - // The ID field must be set. - Container container = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - google.protobuf.FieldMask update_mask = 2; + // Container provides the target values, as declared by the mask, for the update. + // + // The ID field must be set. + Container container = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + google.protobuf.FieldMask update_mask = 2; } message UpdateContainerResponse { - Container container = 1; + Container container = 1; } message DeleteContainerRequest { - string id = 1; + string id = 1; } message ListContainerMessage { - Container container = 1; + Container container = 1; } diff --git a/api/services/content/v1/content.proto b/api/services/content/v1/content.proto index 8aea0636b84f1..7e11305bbdd72 100644 --- a/api/services/content/v1/content.proto +++ b/api/services/content/v1/content.proto @@ -1,330 +1,329 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.content.v1; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/content/v1;content"; // Content provides access to a content addressable storage system. service Content { - // Info returns information about a committed object. - // - // This call can be used for getting the size of content and checking for - // existence. - rpc Info(InfoRequest) returns (InfoResponse); - - // Update updates content metadata. - // - // This call can be used to manage the mutable content labels. The - // immutable metadata such as digest, size, and committed at cannot - // be updated. - rpc Update(UpdateRequest) returns (UpdateResponse); - - // List streams the entire set of content as Info objects and closes the - // stream. - // - // Typically, this will yield a large response, chunked into messages. - // Clients should make provisions to ensure they can handle the entire data - // set. - rpc List(ListContentRequest) returns (stream ListContentResponse); - - // Delete will delete the referenced object. - rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty); - - // Read allows one to read an object based on the offset into the content. - // - // The requested data may be returned in one or more messages. - rpc Read(ReadContentRequest) returns (stream ReadContentResponse); - - // Status returns the status for a single reference. - rpc Status(StatusRequest) returns (StatusResponse); - - // ListStatuses returns the status of ongoing object ingestions, started via - // Write. - // - // Only those matching the regular expression will be provided in the - // response. If the provided regular expression is empty, all ingestions - // will be provided. - rpc ListStatuses(ListStatusesRequest) returns (ListStatusesResponse); - - // Write begins or resumes writes to a resource identified by a unique ref. - // Only one active stream may exist at a time for each ref. - // - // Once a write stream has started, it may only write to a single ref, thus - // once a stream is started, the ref may be omitted on subsequent writes. - // - // For any write transaction represented by a ref, only a single write may - // be made to a given offset. If overlapping writes occur, it is an error. - // Writes should be sequential and implementations may throw an error if - // this is required. - // - // If expected_digest is set and already part of the content store, the - // write will fail. - // - // When completed, the commit flag should be set to true. If expected size - // or digest is set, the content will be validated against those values. - rpc Write(stream WriteContentRequest) returns (stream WriteContentResponse); - - // Abort cancels the ongoing write named in the request. Any resources - // associated with the write will be collected. - rpc Abort(AbortRequest) returns (google.protobuf.Empty); + // Info returns information about a committed object. + // + // This call can be used for getting the size of content and checking for + // existence. + rpc Info(InfoRequest) returns (InfoResponse); + + // Update updates content metadata. + // + // This call can be used to manage the mutable content labels. The + // immutable metadata such as digest, size, and committed at cannot + // be updated. + rpc Update(UpdateRequest) returns (UpdateResponse); + + // List streams the entire set of content as Info objects and closes the + // stream. + // + // Typically, this will yield a large response, chunked into messages. + // Clients should make provisions to ensure they can handle the entire data + // set. + rpc List(ListContentRequest) returns (stream ListContentResponse); + + // Delete will delete the referenced object. + rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty); + + // Read allows one to read an object based on the offset into the content. + // + // The requested data may be returned in one or more messages. + rpc Read(ReadContentRequest) returns (stream ReadContentResponse); + + // Status returns the status for a single reference. + rpc Status(StatusRequest) returns (StatusResponse); + + // ListStatuses returns the status of ongoing object ingestions, started via + // Write. + // + // Only those matching the regular expression will be provided in the + // response. If the provided regular expression is empty, all ingestions + // will be provided. + rpc ListStatuses(ListStatusesRequest) returns (ListStatusesResponse); + + // Write begins or resumes writes to a resource identified by a unique ref. + // Only one active stream may exist at a time for each ref. + // + // Once a write stream has started, it may only write to a single ref, thus + // once a stream is started, the ref may be omitted on subsequent writes. + // + // For any write transaction represented by a ref, only a single write may + // be made to a given offset. If overlapping writes occur, it is an error. + // Writes should be sequential and implementations may throw an error if + // this is required. + // + // If expected_digest is set and already part of the content store, the + // write will fail. + // + // When completed, the commit flag should be set to true. If expected size + // or digest is set, the content will be validated against those values. + rpc Write(stream WriteContentRequest) returns (stream WriteContentResponse); + + // Abort cancels the ongoing write named in the request. Any resources + // associated with the write will be collected. + rpc Abort(AbortRequest) returns (google.protobuf.Empty); } message Info { - // Digest is the hash identity of the blob. - string digest = 1; + // Digest is the hash identity of the blob. + string digest = 1; - // Size is the total number of bytes in the blob. - int64 size = 2; + // Size is the total number of bytes in the blob. + int64 size = 2; - // CreatedAt provides the time at which the blob was committed. - google.protobuf.Timestamp created_at = 3; + // CreatedAt provides the time at which the blob was committed. + google.protobuf.Timestamp created_at = 3; - // UpdatedAt provides the time the info was last updated. - google.protobuf.Timestamp updated_at = 4; + // UpdatedAt provides the time the info was last updated. + google.protobuf.Timestamp updated_at = 4; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 5; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 5; } message InfoRequest { - string digest = 1; + string digest = 1; } message InfoResponse { - Info info = 1; + Info info = 1; } message UpdateRequest { - Info info = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // In info, Digest, Size, and CreatedAt are immutable, - // other field may be updated using this mask. - // If no mask is provided, all mutable field are updated. - google.protobuf.FieldMask update_mask = 2; + Info info = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // In info, Digest, Size, and CreatedAt are immutable, + // other field may be updated using this mask. + // If no mask is provided, all mutable field are updated. + google.protobuf.FieldMask update_mask = 2; } message UpdateResponse { - Info info = 1; + Info info = 1; } message ListContentRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, containers that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, containers that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListContentResponse { - repeated Info info = 1; + repeated Info info = 1; } message DeleteContentRequest { - // Digest specifies which content to delete. - string digest = 1; + // Digest specifies which content to delete. + string digest = 1; } // ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. message ReadContentRequest { - // Digest is the hash identity to read. - string digest = 1; + // Digest is the hash identity to read. + string digest = 1; - // Offset specifies the number of bytes from the start at which to begin - // the read. If zero or less, the read will be from the start. This uses - // standard zero-indexed semantics. - int64 offset = 2; + // Offset specifies the number of bytes from the start at which to begin + // the read. If zero or less, the read will be from the start. This uses + // standard zero-indexed semantics. + int64 offset = 2; - // size is the total size of the read. If zero, the entire blob will be - // returned by the service. - int64 size = 3; + // size is the total size of the read. If zero, the entire blob will be + // returned by the service. + int64 size = 3; } // ReadContentResponse carries byte data for a read request. message ReadContentResponse { - int64 offset = 1; // offset of the returned data - bytes data = 2; // actual data + int64 offset = 1; // offset of the returned data + bytes data = 2; // actual data } message Status { - google.protobuf.Timestamp started_at = 1; - google.protobuf.Timestamp updated_at = 2; - string ref = 3; - int64 offset = 4; - int64 total = 5; - string expected = 6; + google.protobuf.Timestamp started_at = 1; + google.protobuf.Timestamp updated_at = 2; + string ref = 3; + int64 offset = 4; + int64 total = 5; + string expected = 6; } - message StatusRequest { - string ref = 1; + string ref = 1; } message StatusResponse { - Status status = 1; + Status status = 1; } message ListStatusesRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListStatusesResponse { - repeated Status statuses = 1; + repeated Status statuses = 1; } // WriteAction defines the behavior of a WriteRequest. enum WriteAction { - // WriteActionStat instructs the writer to return the current status while - // holding the lock on the write. - STAT = 0; - - // WriteActionWrite sets the action for the write request to write data. - // - // Any data included will be written at the provided offset. The - // transaction will be left open for further writes. - // - // This is the default. - WRITE = 1; - - // WriteActionCommit will write any outstanding data in the message and - // commit the write, storing it under the digest. - // - // This can be used in a single message to send the data, verify it and - // commit it. - // - // This action will always terminate the write. - COMMIT = 2; + // WriteActionStat instructs the writer to return the current status while + // holding the lock on the write. + STAT = 0; + + // WriteActionWrite sets the action for the write request to write data. + // + // Any data included will be written at the provided offset. The + // transaction will be left open for further writes. + // + // This is the default. + WRITE = 1; + + // WriteActionCommit will write any outstanding data in the message and + // commit the write, storing it under the digest. + // + // This can be used in a single message to send the data, verify it and + // commit it. + // + // This action will always terminate the write. + COMMIT = 2; } // WriteContentRequest writes data to the request ref at offset. message WriteContentRequest { - // Action sets the behavior of the write. - // - // When this is a write and the ref is not yet allocated, the ref will be - // allocated and the data will be written at offset. - // - // If the action is write and the ref is allocated, it will accept data to - // an offset that has not yet been written. - // - // If the action is write and there is no data, the current write status - // will be returned. This works differently from status because the stream - // holds a lock. - WriteAction action = 1; - - // Ref identifies the pre-commit object to write to. - string ref = 2; - - // Total can be set to have the service validate the total size of the - // committed content. - // - // The latest value before or with the commit action message will be use to - // validate the content. If the offset overflows total, the service may - // report an error. It is only required on one message for the write. - // - // If the value is zero or less, no validation of the final content will be - // performed. - int64 total = 3; - - // Expected can be set to have the service validate the final content against - // the provided digest. - // - // If the digest is already present in the object store, an AlreadyExists - // error will be returned. - // - // Only the latest version will be used to check the content against the - // digest. It is only required to include it on a single message, before or - // with the commit action message. - string expected = 4; - - // Offset specifies the number of bytes from the start at which to begin - // the write. For most implementations, this means from the start of the - // file. This uses standard, zero-indexed semantics. - // - // If the action is write, the remote may remove all previously written - // data after the offset. Implementations may support arbitrary offsets but - // MUST support reseting this value to zero with a write. If an - // implementation does not support a write at a particular offset, an - // OutOfRange error must be returned. - int64 offset = 5; - - // Data is the actual bytes to be written. - // - // If this is empty and the message is not a commit, a response will be - // returned with the current write state. - bytes data = 6; - - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 7; + // Action sets the behavior of the write. + // + // When this is a write and the ref is not yet allocated, the ref will be + // allocated and the data will be written at offset. + // + // If the action is write and the ref is allocated, it will accept data to + // an offset that has not yet been written. + // + // If the action is write and there is no data, the current write status + // will be returned. This works differently from status because the stream + // holds a lock. + WriteAction action = 1; + + // Ref identifies the pre-commit object to write to. + string ref = 2; + + // Total can be set to have the service validate the total size of the + // committed content. + // + // The latest value before or with the commit action message will be use to + // validate the content. If the offset overflows total, the service may + // report an error. It is only required on one message for the write. + // + // If the value is zero or less, no validation of the final content will be + // performed. + int64 total = 3; + + // Expected can be set to have the service validate the final content against + // the provided digest. + // + // If the digest is already present in the object store, an AlreadyExists + // error will be returned. + // + // Only the latest version will be used to check the content against the + // digest. It is only required to include it on a single message, before or + // with the commit action message. + string expected = 4; + + // Offset specifies the number of bytes from the start at which to begin + // the write. For most implementations, this means from the start of the + // file. This uses standard, zero-indexed semantics. + // + // If the action is write, the remote may remove all previously written + // data after the offset. Implementations may support arbitrary offsets but + // MUST support reseting this value to zero with a write. If an + // implementation does not support a write at a particular offset, an + // OutOfRange error must be returned. + int64 offset = 5; + + // Data is the actual bytes to be written. + // + // If this is empty and the message is not a commit, a response will be + // returned with the current write state. + bytes data = 6; + + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 7; } // WriteContentResponse is returned on the culmination of a write call. message WriteContentResponse { - // Action contains the action for the final message of the stream. A writer - // should confirm that they match the intended result. - WriteAction action = 1; - - // StartedAt provides the time at which the write began. - // - // This must be set for stat and commit write actions. All other write - // actions may omit this. - google.protobuf.Timestamp started_at = 2; - - // UpdatedAt provides the last time of a successful write. - // - // This must be set for stat and commit write actions. All other write - // actions may omit this. - google.protobuf.Timestamp updated_at = 3; - - // Offset is the current committed size for the write. - int64 offset = 4; - - // Total provides the current, expected total size of the write. - // - // We include this to provide consistency with the Status structure on the - // client writer. - // - // This is only valid on the Stat and Commit response. - int64 total = 5; - - // Digest, if present, includes the digest up to the currently committed - // bytes. If action is commit, this field will be set. It is implementation - // defined if this is set for other actions. - string digest = 6; + // Action contains the action for the final message of the stream. A writer + // should confirm that they match the intended result. + WriteAction action = 1; + + // StartedAt provides the time at which the write began. + // + // This must be set for stat and commit write actions. All other write + // actions may omit this. + google.protobuf.Timestamp started_at = 2; + + // UpdatedAt provides the last time of a successful write. + // + // This must be set for stat and commit write actions. All other write + // actions may omit this. + google.protobuf.Timestamp updated_at = 3; + + // Offset is the current committed size for the write. + int64 offset = 4; + + // Total provides the current, expected total size of the write. + // + // We include this to provide consistency with the Status structure on the + // client writer. + // + // This is only valid on the Stat and Commit response. + int64 total = 5; + + // Digest, if present, includes the digest up to the currently committed + // bytes. If action is commit, this field will be set. It is implementation + // defined if this is set for other actions. + string digest = 6; } message AbortRequest { - string ref = 1; + string ref = 1; } diff --git a/api/services/diff/v1/diff.proto b/api/services/diff/v1/diff.proto index 504d1028ea180..53c6aa2b2fbd5 100644 --- a/api/services/diff/v1/diff.proto +++ b/api/services/diff/v1/diff.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -20,71 +20,71 @@ package containerd.services.diff.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; -import "types/mount.proto"; import "types/descriptor.proto"; +import "types/mount.proto"; option go_package = "github.com/containerd/containerd/api/services/diff/v1;diff"; // Diff service creates and applies diffs service Diff { - // Apply applies the content associated with the provided digests onto - // the provided mounts. Archive content will be extracted and - // decompressed if necessary. - rpc Apply(ApplyRequest) returns (ApplyResponse); - - // Diff creates a diff between the given mounts and uploads the result - // to the content store. - rpc Diff(DiffRequest) returns (DiffResponse); + // Apply applies the content associated with the provided digests onto + // the provided mounts. Archive content will be extracted and + // decompressed if necessary. + rpc Apply(ApplyRequest) returns (ApplyResponse); + + // Diff creates a diff between the given mounts and uploads the result + // to the content store. + rpc Diff(DiffRequest) returns (DiffResponse); } message ApplyRequest { - // Diff is the descriptor of the diff to be extracted - containerd.types.Descriptor diff = 1; + // Diff is the descriptor of the diff to be extracted + containerd.types.Descriptor diff = 1; - repeated containerd.types.Mount mounts = 2; + repeated containerd.types.Mount mounts = 2; - map payloads = 3; - // SyncFs is to synchronize the underlying filesystem containing files. - bool sync_fs = 4; + map payloads = 3; + // SyncFs is to synchronize the underlying filesystem containing files. + bool sync_fs = 4; } message ApplyResponse { - // Applied is the descriptor for the object which was applied. - // If the input was a compressed blob then the result will be - // the descriptor for the uncompressed blob. - containerd.types.Descriptor applied = 1; + // Applied is the descriptor for the object which was applied. + // If the input was a compressed blob then the result will be + // the descriptor for the uncompressed blob. + containerd.types.Descriptor applied = 1; } message DiffRequest { - // Left are the mounts which represent the older copy - // in which is the base of the computed changes. - repeated containerd.types.Mount left = 1; - - // Right are the mounts which represents the newer copy - // in which changes from the left were made into. - repeated containerd.types.Mount right = 2; - - // MediaType is the media type descriptor for the created diff - // object - string media_type = 3; - - // Ref identifies the pre-commit content store object. This - // reference can be used to get the status from the content store. - string ref = 4; - - // Labels are the labels to apply to the generated content - // on content store commit. - map labels = 5; - - // SourceDateEpoch specifies the timestamp used to provide control for reproducibility. - // See also https://reproducible-builds.org/docs/source-date-epoch/ . - // - // Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01), - // not to the source date epoch. - google.protobuf.Timestamp source_date_epoch = 6; + // Left are the mounts which represent the older copy + // in which is the base of the computed changes. + repeated containerd.types.Mount left = 1; + + // Right are the mounts which represents the newer copy + // in which changes from the left were made into. + repeated containerd.types.Mount right = 2; + + // MediaType is the media type descriptor for the created diff + // object + string media_type = 3; + + // Ref identifies the pre-commit content store object. This + // reference can be used to get the status from the content store. + string ref = 4; + + // Labels are the labels to apply to the generated content + // on content store commit. + map labels = 5; + + // SourceDateEpoch specifies the timestamp used to provide control for reproducibility. + // See also https://reproducible-builds.org/docs/source-date-epoch/ . + // + // Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01), + // not to the source date epoch. + google.protobuf.Timestamp source_date_epoch = 6; } message DiffResponse { - // Diff is the descriptor of the diff which can be applied - containerd.types.Descriptor diff = 3; + // Diff is the descriptor of the diff which can be applied + containerd.types.Descriptor diff = 3; } diff --git a/api/services/events/v1/events.proto b/api/services/events/v1/events.proto index 1d39bbe4be3a6..a87da21c4f0d2 100644 --- a/api/services/events/v1/events.proto +++ b/api/services/events/v1/events.proto @@ -1,62 +1,62 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.events.v1; -import "types/event.proto"; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; +import "types/event.proto"; option go_package = "github.com/containerd/containerd/api/services/events/v1;events"; service Events { - // Publish an event to a topic. - // - // The event will be packed into a timestamp envelope with the namespace - // introspected from the context. The envelope will then be dispatched. - rpc Publish(PublishRequest) returns (google.protobuf.Empty); - - // Forward sends an event that has already been packaged into an envelope - // with a timestamp and namespace. - // - // This is useful if earlier timestamping is required or when forwarding on - // behalf of another component, namespace or publisher. - rpc Forward(ForwardRequest) returns (google.protobuf.Empty); - - // Subscribe to a stream of events, possibly returning only that match any - // of the provided filters. - // - // Unlike many other methods in containerd, subscribers will get messages - // from all namespaces unless otherwise specified. If this is not desired, - // a filter can be provided in the format 'namespace==' to - // restrict the received events. - rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope); + // Publish an event to a topic. + // + // The event will be packed into a timestamp envelope with the namespace + // introspected from the context. The envelope will then be dispatched. + rpc Publish(PublishRequest) returns (google.protobuf.Empty); + + // Forward sends an event that has already been packaged into an envelope + // with a timestamp and namespace. + // + // This is useful if earlier timestamping is required or when forwarding on + // behalf of another component, namespace or publisher. + rpc Forward(ForwardRequest) returns (google.protobuf.Empty); + + // Subscribe to a stream of events, possibly returning only that match any + // of the provided filters. + // + // Unlike many other methods in containerd, subscribers will get messages + // from all namespaces unless otherwise specified. If this is not desired, + // a filter can be provided in the format 'namespace==' to + // restrict the received events. + rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope); } message PublishRequest { - string topic = 1; - google.protobuf.Any event = 2; + string topic = 1; + google.protobuf.Any event = 2; } message ForwardRequest { - containerd.types.Envelope envelope = 1; + containerd.types.Envelope envelope = 1; } message SubscribeRequest { - repeated string filters = 1; + repeated string filters = 1; } diff --git a/api/services/images/v1/images.proto b/api/services/images/v1/images.proto index b09514b9713fb..19d19207a8c2e 100644 --- a/api/services/images/v1/images.proto +++ b/api/services/images/v1/images.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -37,113 +37,113 @@ option go_package = "github.com/containerd/containerd/api/services/images/v1;ima // // As such, this can really be considered a "metadata service". service Images { - // Get returns an image by name. - rpc Get(GetImageRequest) returns (GetImageResponse); + // Get returns an image by name. + rpc Get(GetImageRequest) returns (GetImageResponse); - // List returns a list of all images known to containerd. - rpc List(ListImagesRequest) returns (ListImagesResponse); + // List returns a list of all images known to containerd. + rpc List(ListImagesRequest) returns (ListImagesResponse); - // Create an image record in the metadata store. - // - // The name of the image must be unique. - rpc Create(CreateImageRequest) returns (CreateImageResponse); + // Create an image record in the metadata store. + // + // The name of the image must be unique. + rpc Create(CreateImageRequest) returns (CreateImageResponse); - // Update assigns the name to a given target image based on the provided - // image. - rpc Update(UpdateImageRequest) returns (UpdateImageResponse); + // Update assigns the name to a given target image based on the provided + // image. + rpc Update(UpdateImageRequest) returns (UpdateImageResponse); - // Delete deletes the image by name. - rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); + // Delete deletes the image by name. + rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); } message Image { - // Name provides a unique name for the image. - // - // Containerd treats this as the primary identifier. - string name = 1; - - // Labels provides free form labels for the image. These are runtime only - // and do not get inherited into the package image in any way. - // - // Labels may be updated using the field mask. - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 2; - - // Target describes the content entry point of the image. - containerd.types.Descriptor target = 3; - - // CreatedAt is the time the image was first created. - google.protobuf.Timestamp created_at = 7; - - // UpdatedAt is the last time the image was mutated. - google.protobuf.Timestamp updated_at = 8; + // Name provides a unique name for the image. + // + // Containerd treats this as the primary identifier. + string name = 1; + + // Labels provides free form labels for the image. These are runtime only + // and do not get inherited into the package image in any way. + // + // Labels may be updated using the field mask. + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 2; + + // Target describes the content entry point of the image. + containerd.types.Descriptor target = 3; + + // CreatedAt is the time the image was first created. + google.protobuf.Timestamp created_at = 7; + + // UpdatedAt is the last time the image was mutated. + google.protobuf.Timestamp updated_at = 8; } message GetImageRequest { - string name = 1; + string name = 1; } message GetImageResponse { - Image image = 1; + Image image = 1; } message CreateImageRequest { - Image image = 1; + Image image = 1; - google.protobuf.Timestamp source_date_epoch = 2; + google.protobuf.Timestamp source_date_epoch = 2; } message CreateImageResponse { - Image image = 1; + Image image = 1; } message UpdateImageRequest { - // Image provides a full or partial image for update. - // - // The name field must be set or an error will be returned. - Image image = 1; + // Image provides a full or partial image for update. + // + // The name field must be set or an error will be returned. + Image image = 1; - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - google.protobuf.FieldMask update_mask = 2; + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + google.protobuf.FieldMask update_mask = 2; - google.protobuf.Timestamp source_date_epoch = 3; + google.protobuf.Timestamp source_date_epoch = 3; } message UpdateImageResponse { - Image image = 1; + Image image = 1; } message ListImagesRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, images that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListImagesResponse { - repeated Image images = 1; + repeated Image images = 1; } message DeleteImageRequest { - string name = 1; - - // Sync indicates that the delete and cleanup should be done - // synchronously before returning to the caller - // - // Default is false - bool sync = 2; - - // Target value for image to be deleted - // - // If image descriptor does not match the same digest, - // the delete operation will return "not found" error. - optional containerd.types.Descriptor target = 3; + string name = 1; + + // Sync indicates that the delete and cleanup should be done + // synchronously before returning to the caller + // + // Default is false + bool sync = 2; + + // Target value for image to be deleted + // + // If image descriptor does not match the same digest, + // the delete operation will return "not found" error. + optional containerd.types.Descriptor target = 3; } diff --git a/api/services/introspection/v1/introspection.proto b/api/services/introspection/v1/introspection.proto index e8d25e00c8906..a012ac8281ef4 100644 --- a/api/services/introspection/v1/introspection.proto +++ b/api/services/introspection/v1/introspection.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -19,115 +19,115 @@ syntax = "proto3"; package containerd.services.introspection.v1; import "google/protobuf/any.proto"; -import "types/introspection.proto"; -import "types/platform.proto"; -import "google/rpc/status.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "types/introspection.proto"; +import "types/platform.proto"; option go_package = "github.com/containerd/containerd/api/services/introspection/v1;introspection"; service Introspection { - // Plugins returns a list of plugins in containerd. - // - // Clients can use this to detect features and capabilities when using - // containerd. - rpc Plugins(PluginsRequest) returns (PluginsResponse); - // Server returns information about the containerd server - rpc Server(google.protobuf.Empty) returns (ServerResponse); - // PluginInfo returns information directly from a plugin if the plugin supports it - rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse); + // Plugins returns a list of plugins in containerd. + // + // Clients can use this to detect features and capabilities when using + // containerd. + rpc Plugins(PluginsRequest) returns (PluginsResponse); + // Server returns information about the containerd server + rpc Server(google.protobuf.Empty) returns (ServerResponse); + // PluginInfo returns information directly from a plugin if the plugin supports it + rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse); } message Plugin { - // Type defines the type of plugin. - // - // See package plugin for a list of possible values. Non core plugins may - // define their own values during registration. - string type = 1; - - // ID identifies the plugin uniquely in the system. - string id = 2; - - // Requires lists the plugin types required by this plugin. - repeated string requires = 3; - - // Platforms enumerates the platforms this plugin will support. - // - // If values are provided here, the plugin will only be operable under the - // provided platforms. - // - // If this is empty, the plugin will work across all platforms. - // - // If the plugin prefers certain platforms over others, they should be - // listed from most to least preferred. - repeated types.Platform platforms = 4; - - // Exports allows plugins to provide values about state or configuration to - // interested parties. - // - // One example is exposing the configured path of a snapshotter plugin. - map exports = 5; - - // Capabilities allows plugins to communicate feature switches to allow - // clients to detect features that may not be on be default or may be - // different from version to version. - // - // Use this sparingly. - repeated string capabilities = 6; - - // InitErr will be set if the plugin fails initialization. - // - // This means the plugin may have been registered but a non-terminal error - // was encountered during initialization. - // - // Plugins that have this value set cannot be used. - google.rpc.Status init_err = 7; + // Type defines the type of plugin. + // + // See package plugin for a list of possible values. Non core plugins may + // define their own values during registration. + string type = 1; + + // ID identifies the plugin uniquely in the system. + string id = 2; + + // Requires lists the plugin types required by this plugin. + repeated string requires = 3; + + // Platforms enumerates the platforms this plugin will support. + // + // If values are provided here, the plugin will only be operable under the + // provided platforms. + // + // If this is empty, the plugin will work across all platforms. + // + // If the plugin prefers certain platforms over others, they should be + // listed from most to least preferred. + repeated types.Platform platforms = 4; + + // Exports allows plugins to provide values about state or configuration to + // interested parties. + // + // One example is exposing the configured path of a snapshotter plugin. + map exports = 5; + + // Capabilities allows plugins to communicate feature switches to allow + // clients to detect features that may not be on be default or may be + // different from version to version. + // + // Use this sparingly. + repeated string capabilities = 6; + + // InitErr will be set if the plugin fails initialization. + // + // This means the plugin may have been registered but a non-terminal error + // was encountered during initialization. + // + // Plugins that have this value set cannot be used. + google.rpc.Status init_err = 7; } message PluginsRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, plugins that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, plugins that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message PluginsResponse { - repeated Plugin plugins = 1; + repeated Plugin plugins = 1; } message ServerResponse { - string uuid = 1; - uint64 pid = 2; - uint64 pidns = 3; // PID namespace, such as 4026531836 - repeated DeprecationWarning deprecations = 4; + string uuid = 1; + uint64 pid = 2; + uint64 pidns = 3; // PID namespace, such as 4026531836 + repeated DeprecationWarning deprecations = 4; } message DeprecationWarning { - string id = 1; - string message = 2; - google.protobuf.Timestamp last_occurrence = 3; + string id = 1; + string message = 2; + google.protobuf.Timestamp last_occurrence = 3; } message PluginInfoRequest { - string type = 1; - string id = 2; - - // Options may be used to request extra dynamic information from - // a plugin. - // This object is determined by the plugin and the plugin may return - // NotImplemented or InvalidArgument if it is not supported - google.protobuf.Any options = 3; + string type = 1; + string id = 2; + + // Options may be used to request extra dynamic information from + // a plugin. + // This object is determined by the plugin and the plugin may return + // NotImplemented or InvalidArgument if it is not supported + google.protobuf.Any options = 3; } message PluginInfoResponse { - Plugin plugin = 1; - google.protobuf.Any extra = 2; + Plugin plugin = 1; + google.protobuf.Any extra = 2; } diff --git a/api/services/leases/v1/leases.proto b/api/services/leases/v1/leases.proto index 8551fcea7f64f..acfdbf3c44b65 100644 --- a/api/services/leases/v1/leases.proto +++ b/api/services/leases/v1/leases.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,93 +24,93 @@ option go_package = "github.com/containerd/containerd/api/services/leases/v1;lea // Leases service manages resources leases within the metadata store. service Leases { - // Create creates a new lease for managing changes to metadata. A lease - // can be used to protect objects from being removed. - rpc Create(CreateRequest) returns (CreateResponse); + // Create creates a new lease for managing changes to metadata. A lease + // can be used to protect objects from being removed. + rpc Create(CreateRequest) returns (CreateResponse); - // Delete deletes the lease and makes any unreferenced objects created - // during the lease eligible for garbage collection if not referenced - // or retained by other resources during the lease. - rpc Delete(DeleteRequest) returns (google.protobuf.Empty); + // Delete deletes the lease and makes any unreferenced objects created + // during the lease eligible for garbage collection if not referenced + // or retained by other resources during the lease. + rpc Delete(DeleteRequest) returns (google.protobuf.Empty); - // List lists all active leases, returning the full list of - // leases and optionally including the referenced resources. - rpc List(ListRequest) returns (ListResponse); + // List lists all active leases, returning the full list of + // leases and optionally including the referenced resources. + rpc List(ListRequest) returns (ListResponse); - // AddResource references the resource by the provided lease. - rpc AddResource(AddResourceRequest) returns (google.protobuf.Empty); + // AddResource references the resource by the provided lease. + rpc AddResource(AddResourceRequest) returns (google.protobuf.Empty); - // DeleteResource dereferences the resource by the provided lease. - rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty); + // DeleteResource dereferences the resource by the provided lease. + rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty); - // ListResources lists all the resources referenced by the lease. - rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse); + // ListResources lists all the resources referenced by the lease. + rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse); } // Lease is an object which retains resources while it exists. message Lease { - string id = 1; + string id = 1; - google.protobuf.Timestamp created_at = 2; + google.protobuf.Timestamp created_at = 2; - map labels = 3; + map labels = 3; } message CreateRequest { - // ID is used to identity the lease, when the id is not set the service - // generates a random identifier for the lease. - string id = 1; + // ID is used to identity the lease, when the id is not set the service + // generates a random identifier for the lease. + string id = 1; - map labels = 3; + map labels = 3; } message CreateResponse { - Lease lease = 1; + Lease lease = 1; } message DeleteRequest { - string id = 1; + string id = 1; - // Sync indicates that the delete and cleanup should be done - // synchronously before returning to the caller - // - // Default is false - bool sync = 2; + // Sync indicates that the delete and cleanup should be done + // synchronously before returning to the caller + // + // Default is false + bool sync = 2; } message ListRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListResponse { - repeated Lease leases = 1; + repeated Lease leases = 1; } message Resource { - string id = 1; + string id = 1; - // For snapshotter resource, there are many snapshotter types here, like - // overlayfs, devmapper etc. The type will be formatted with type, - // like "snapshotter/overlayfs". - string type = 2; + // For snapshotter resource, there are many snapshotter types here, like + // overlayfs, devmapper etc. The type will be formatted with type, + // like "snapshotter/overlayfs". + string type = 2; } message AddResourceRequest { - string id = 1; + string id = 1; - Resource resource = 2; + Resource resource = 2; } message DeleteResourceRequest { - string id = 1; + string id = 1; - Resource resource = 2; + Resource resource = 2; } message ListResourcesRequest { - string id = 1; + string id = 1; } message ListResourcesResponse { - repeated Resource resources = 1 ; + repeated Resource resources = 1; } diff --git a/api/services/mounts/v1/mounts.proto b/api/services/mounts/v1/mounts.proto index 11ba1a4c42288..d731a91d073c8 100644 --- a/api/services/mounts/v1/mounts.proto +++ b/api/services/mounts/v1/mounts.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -25,54 +25,53 @@ option go_package = "github.com/containerd/containerd/api/services/mounts/v1;mou // Mounts service manages mounts service Mounts { - rpc Activate(ActivateRequest) returns (ActivateResponse); - rpc Deactivate(DeactivateRequest) returns (google.protobuf.Empty); - rpc Info(InfoRequest) returns (InfoResponse); - rpc Update(UpdateRequest) returns (UpdateResponse); - rpc List(ListRequest) returns (stream ListMessage); + rpc Activate(ActivateRequest) returns (ActivateResponse); + rpc Deactivate(DeactivateRequest) returns (google.protobuf.Empty); + rpc Info(InfoRequest) returns (InfoResponse); + rpc Update(UpdateRequest) returns (UpdateResponse); + rpc List(ListRequest) returns (stream ListMessage); } message ActivateRequest { - string name = 1; + string name = 1; - repeated containerd.types.Mount mounts = 2; + repeated containerd.types.Mount mounts = 2; - map labels = 3; - - bool temporary = 4; + map labels = 3; + bool temporary = 4; } message ActivateResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message DeactivateRequest { - string name = 1; + string name = 1; } message InfoRequest { - string name = 1; + string name = 1; } message InfoResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message UpdateRequest { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2; } message UpdateResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message ListRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListMessage { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } diff --git a/api/services/namespaces/v1/namespace.proto b/api/services/namespaces/v1/namespace.proto index 910bcd6c72088..f534875dc6360 100644 --- a/api/services/namespaces/v1/namespace.proto +++ b/api/services/namespaces/v1/namespace.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -35,47 +35,47 @@ option go_package = "github.com/containerd/containerd/api/services/namespaces/v1 // I hope this goes without saying, but namespaces are themselves NOT // namespaced. service Namespaces { - rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); - rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); - rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); - rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); - rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); + rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); + rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); + rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); + rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); + rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); } message Namespace { - string name = 1; - - // Labels provides an area to include arbitrary data on namespaces. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - // - // Note that to add a new value to this field, read the existing set and - // include the entire result in the update call. - map labels = 2; + string name = 1; + + // Labels provides an area to include arbitrary data on namespaces. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + // + // Note that to add a new value to this field, read the existing set and + // include the entire result in the update call. + map labels = 2; } message GetNamespaceRequest { - string name = 1; + string name = 1; } message GetNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } message ListNamespacesRequest { - string filter = 1; + string filter = 1; } message ListNamespacesResponse { - repeated Namespace namespaces = 1; + repeated Namespace namespaces = 1; } message CreateNamespaceRequest { - Namespace namespace = 1; + Namespace namespace = 1; } message CreateNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } // UpdateNamespaceRequest updates the metadata for a namespace. @@ -84,24 +84,24 @@ message CreateNamespaceResponse { // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateNamespaceRequest { - // Namespace provides the target value, as declared by the mask, for the update. - // - // The namespace field must be set. - Namespace namespace = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // For the most part, this applies only to selectively updating labels on - // the namespace. While field masks are typically limited to ascii alphas - // and digits, we just take everything after the "labels." as the map key. - google.protobuf.FieldMask update_mask = 2; + // Namespace provides the target value, as declared by the mask, for the update. + // + // The namespace field must be set. + Namespace namespace = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // For the most part, this applies only to selectively updating labels on + // the namespace. While field masks are typically limited to ascii alphas + // and digits, we just take everything after the "labels." as the map key. + google.protobuf.FieldMask update_mask = 2; } message UpdateNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } message DeleteNamespaceRequest { - string name = 1; + string name = 1; } diff --git a/api/services/sandbox/v1/sandbox.proto b/api/services/sandbox/v1/sandbox.proto index 5ee7839642c56..fcbf5053cc8e3 100755 --- a/api/services/sandbox/v1/sandbox.proto +++ b/api/services/sandbox/v1/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -27,11 +27,10 @@ package containerd.services.sandbox.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; - -import "types/sandbox.proto"; +import "types/metrics.proto"; import "types/mount.proto"; import "types/platform.proto"; -import "types/metrics.proto"; +import "types/sandbox.proto"; option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sandbox"; @@ -39,166 +38,165 @@ option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sa // sandbox object includes info required to start a new instance, but no runtime state. // When running a new sandbox instance, store objects are used as base type to create from. service Store { - rpc Create(StoreCreateRequest) returns (StoreCreateResponse); - rpc Update(StoreUpdateRequest) returns (StoreUpdateResponse); - rpc Delete(StoreDeleteRequest) returns (StoreDeleteResponse); - rpc List(StoreListRequest) returns (StoreListResponse); - rpc Get(StoreGetRequest) returns (StoreGetResponse); + rpc Create(StoreCreateRequest) returns (StoreCreateResponse); + rpc Update(StoreUpdateRequest) returns (StoreUpdateResponse); + rpc Delete(StoreDeleteRequest) returns (StoreDeleteResponse); + rpc List(StoreListRequest) returns (StoreListResponse); + rpc Get(StoreGetRequest) returns (StoreGetResponse); } message StoreCreateRequest { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreCreateResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreUpdateRequest { - containerd.types.Sandbox sandbox = 1; - repeated string fields = 2; + containerd.types.Sandbox sandbox = 1; + repeated string fields = 2; } message StoreUpdateResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreDeleteRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StoreDeleteResponse {} message StoreListRequest { - repeated string filters = 1; + repeated string filters = 1; } message StoreListResponse { - repeated containerd.types.Sandbox list = 1; + repeated containerd.types.Sandbox list = 1; } message StoreGetRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StoreGetResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } // Controller is an interface to manage runtime sandbox instances. service Controller { - rpc Create(ControllerCreateRequest) returns (ControllerCreateResponse); - rpc Start(ControllerStartRequest) returns (ControllerStartResponse); - rpc Platform(ControllerPlatformRequest) returns (ControllerPlatformResponse); - rpc Stop(ControllerStopRequest) returns (ControllerStopResponse); - rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse); - rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse); - rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse); - rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse); - rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse); + rpc Create(ControllerCreateRequest) returns (ControllerCreateResponse); + rpc Start(ControllerStartRequest) returns (ControllerStartResponse); + rpc Platform(ControllerPlatformRequest) returns (ControllerPlatformResponse); + rpc Stop(ControllerStopRequest) returns (ControllerStopResponse); + rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse); + rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse); + rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse); + rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse); + rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse); } message ControllerCreateRequest { - string sandbox_id = 1; - repeated containerd.types.Mount rootfs = 2; - google.protobuf.Any options = 3; - string netns_path = 4; - map annotations = 5; - containerd.types.Sandbox sandbox = 6; - string sandboxer = 10; + string sandbox_id = 1; + repeated containerd.types.Mount rootfs = 2; + google.protobuf.Any options = 3; + string netns_path = 4; + map annotations = 5; + containerd.types.Sandbox sandbox = 6; + string sandboxer = 10; } message ControllerCreateResponse { - string sandbox_id = 1; + string sandbox_id = 1; } message ControllerStartRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerStartResponse { - string sandbox_id = 1; - uint32 pid = 2; - google.protobuf.Timestamp created_at = 3; - map labels = 4; - // Address of the sandbox for containerd to connect, - // for calling Task or other APIs serving in the sandbox. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string address = 5; - uint32 version = 6; + string sandbox_id = 1; + uint32 pid = 2; + google.protobuf.Timestamp created_at = 3; + map labels = 4; + // Address of the sandbox for containerd to connect, + // for calling Task or other APIs serving in the sandbox. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string address = 5; + uint32 version = 6; } message ControllerPlatformRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerPlatformResponse { - containerd.types.Platform platform = 1; + containerd.types.Platform platform = 1; } message ControllerStopRequest { - string sandbox_id = 1; - uint32 timeout_secs = 2; - string sandboxer = 10; + string sandbox_id = 1; + uint32 timeout_secs = 2; + string sandboxer = 10; } message ControllerStopResponse {} message ControllerWaitRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerWaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message ControllerStatusRequest { - string sandbox_id = 1; - bool verbose = 2; - string sandboxer = 10; + string sandbox_id = 1; + bool verbose = 2; + string sandboxer = 10; } message ControllerStatusResponse { - string sandbox_id = 1; - uint32 pid = 2; - string state = 3; - map info = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp exited_at = 6; - google.protobuf.Any extra = 7; - // Address of the sandbox for containerd to connect, - // for calling Task or other APIs serving in the sandbox. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string address = 8; - uint32 version = 9; + string sandbox_id = 1; + uint32 pid = 2; + string state = 3; + map info = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp exited_at = 6; + google.protobuf.Any extra = 7; + // Address of the sandbox for containerd to connect, + // for calling Task or other APIs serving in the sandbox. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string address = 8; + uint32 version = 9; } message ControllerShutdownRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerShutdownResponse {} message ControllerMetricsRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerMetricsResponse { - types.Metric metrics = 1; + types.Metric metrics = 1; } message ControllerUpdateRequest { - string sandbox_id = 1; - string sandboxer = 2; - containerd.types.Sandbox sandbox = 3; - repeated string fields = 4; + string sandbox_id = 1; + string sandboxer = 2; + containerd.types.Sandbox sandbox = 3; + repeated string fields = 4; } -message ControllerUpdateResponse { -} +message ControllerUpdateResponse {} diff --git a/api/services/snapshots/v1/snapshots.proto b/api/services/snapshots/v1/snapshots.proto index e63ec35b5a487..eb8a98f793c2d 100644 --- a/api/services/snapshots/v1/snapshots.proto +++ b/api/services/snapshots/v1/snapshots.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -27,155 +27,155 @@ option go_package = "github.com/containerd/containerd/api/services/snapshots/v1; // Snapshot service manages snapshots service Snapshots { - rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); - rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); - rpc Mounts(MountsRequest) returns (MountsResponse); - rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); - rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); - rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); - rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); - rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); - rpc Usage(UsageRequest) returns (UsageResponse); - rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); + rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); + rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); + rpc Mounts(MountsRequest) returns (MountsResponse); + rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); + rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); + rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); + rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); + rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); + rpc Usage(UsageRequest) returns (UsageResponse); + rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); } message PrepareSnapshotRequest { - string snapshotter = 1; - string key = 2; - string parent = 3; + string snapshotter = 1; + string key = 2; + string parent = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; } message PrepareSnapshotResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message ViewSnapshotRequest { - string snapshotter = 1; - string key = 2; - string parent = 3; + string snapshotter = 1; + string key = 2; + string parent = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; } message ViewSnapshotResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message MountsRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message MountsResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message RemoveSnapshotRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message CommitSnapshotRequest { - string snapshotter = 1; - string name = 2; - string key = 3; + string snapshotter = 1; + string name = 2; + string key = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; - string parent = 5; + string parent = 5; } message StatSnapshotRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } enum Kind { - UNKNOWN = 0; - VIEW = 1; - ACTIVE = 2; - COMMITTED = 3; + UNKNOWN = 0; + VIEW = 1; + ACTIVE = 2; + COMMITTED = 3; } message Info { - string name = 1; - string parent = 2; - Kind kind = 3; + string name = 1; + string parent = 2; + Kind kind = 3; - // CreatedAt provides the time at which the snapshot was created. - google.protobuf.Timestamp created_at = 4; + // CreatedAt provides the time at which the snapshot was created. + google.protobuf.Timestamp created_at = 4; - // UpdatedAt provides the time the info was last updated. - google.protobuf.Timestamp updated_at = 5; + // UpdatedAt provides the time the info was last updated. + google.protobuf.Timestamp updated_at = 5; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 6; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 6; } message StatSnapshotResponse { - Info info = 1; + Info info = 1; } message UpdateSnapshotRequest { - string snapshotter = 1; - Info info = 2; + string snapshotter = 1; + Info info = 2; - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // In info, Name, Parent, Kind, Created are immutable, - // other field may be updated using this mask. - // If no mask is provided, all mutable field are updated. - google.protobuf.FieldMask update_mask = 3; + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // In info, Name, Parent, Kind, Created are immutable, + // other field may be updated using this mask. + // If no mask is provided, all mutable field are updated. + google.protobuf.FieldMask update_mask = 3; } message UpdateSnapshotResponse { - Info info = 1; + Info info = 1; } -message ListSnapshotsRequest{ - string snapshotter = 1; +message ListSnapshotsRequest { + string snapshotter = 1; - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, images that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 2; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 2; } message ListSnapshotsResponse { - repeated Info info = 1; + repeated Info info = 1; } message UsageRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message UsageResponse { - int64 size = 1; - int64 inodes = 2; + int64 size = 1; + int64 inodes = 2; } message CleanupRequest { - string snapshotter = 1; + string snapshotter = 1; } diff --git a/api/services/streaming/v1/streaming.proto b/api/services/streaming/v1/streaming.proto index 4c14f2ecfa095..57e1a7c019e08 100644 --- a/api/services/streaming/v1/streaming.proto +++ b/api/services/streaming/v1/streaming.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,9 +23,9 @@ import "google/protobuf/any.proto"; option go_package = "github.com/containerd/containerd/api/services/streaming/v1;streaming"; service Streaming { - rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any); + rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any); } message StreamInit { - string id = 1; + string id = 1; } diff --git a/api/services/tasks/v1/tasks.proto b/api/services/tasks/v1/tasks.proto index a46ebaf429ac9..4113f45bf5fad 100644 --- a/api/services/tasks/v1/tasks.proto +++ b/api/services/tasks/v1/tasks.proto @@ -1,227 +1,226 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.tasks.v1; -import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; -import "types/mount.proto"; -import "types/metrics.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; import "types/descriptor.proto"; +import "types/metrics.proto"; +import "types/mount.proto"; import "types/task/task.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/tasks/v1;tasks"; service Tasks { - // Create a task. - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + // Create a task. + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - // Start a process. - rpc Start(StartRequest) returns (StartResponse); + // Start a process. + rpc Start(StartRequest) returns (StartResponse); - // Delete a task and on disk state. - rpc Delete(DeleteTaskRequest) returns (DeleteResponse); + // Delete a task and on disk state. + rpc Delete(DeleteTaskRequest) returns (DeleteResponse); - rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); + rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); - rpc Get(GetRequest) returns (GetResponse); + rpc Get(GetRequest) returns (GetResponse); - rpc List(ListTasksRequest) returns (ListTasksResponse); + rpc List(ListTasksRequest) returns (ListTasksResponse); - // Kill a task or process. - rpc Kill(KillRequest) returns (google.protobuf.Empty); + // Kill a task or process. + rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); + rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); - rpc ListPids(ListPidsRequest) returns (ListPidsResponse); + rpc ListPids(ListPidsRequest) returns (ListPidsResponse); - rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); + rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Metrics(MetricsRequest) returns (MetricsResponse); + rpc Metrics(MetricsRequest) returns (MetricsResponse); - rpc Wait(WaitRequest) returns (WaitResponse); + rpc Wait(WaitRequest) returns (WaitResponse); } message CreateTaskRequest { - string container_id = 1; + string container_id = 1; - // RootFS provides the pre-chroot mounts to perform in the shim before - // executing the container task. - // - // These are for mounts that cannot be performed in the user namespace. - // Typically, these mounts should be resolved from snapshots specified on - // the container object. - repeated containerd.types.Mount rootfs = 3; + // RootFS provides the pre-chroot mounts to perform in the shim before + // executing the container task. + // + // These are for mounts that cannot be performed in the user namespace. + // Typically, these mounts should be resolved from snapshots specified on + // the container object. + repeated containerd.types.Mount rootfs = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - bool terminal = 7; + string stdin = 4; + string stdout = 5; + string stderr = 6; + bool terminal = 7; - containerd.types.Descriptor checkpoint = 8; + containerd.types.Descriptor checkpoint = 8; - google.protobuf.Any options = 9; + google.protobuf.Any options = 9; - string runtime_path = 10; + string runtime_path = 10; } message CreateTaskResponse { - string container_id = 1; - uint32 pid = 2; + string container_id = 1; + uint32 pid = 2; } message StartRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteTaskRequest { - string container_id = 1; + string container_id = 1; } message DeleteResponse { - string id = 1; - uint32 pid = 2; - uint32 exit_status = 3; - google.protobuf.Timestamp exited_at = 4; + string id = 1; + uint32 pid = 2; + uint32 exit_status = 3; + google.protobuf.Timestamp exited_at = 4; } message DeleteProcessRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message GetRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message GetResponse { - containerd.v1.types.Process process = 1; + containerd.v1.types.Process process = 1; } message ListTasksRequest { - string filter = 1; + string filter = 1; } message ListTasksResponse { - repeated containerd.v1.types.Process tasks = 1; + repeated containerd.v1.types.Process tasks = 1; } message KillRequest { - string container_id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string container_id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message ExecProcessRequest { - string container_id = 1; - string stdin = 2; - string stdout = 3; - string stderr = 4; - bool terminal = 5; - // Spec for starting a process in the target container. - // - // For runc, this is a process spec, for example. - google.protobuf.Any spec = 6; - // id of the exec process - string exec_id = 7; + string container_id = 1; + string stdin = 2; + string stdout = 3; + string stderr = 4; + bool terminal = 5; + // Spec for starting a process in the target container. + // + // For runc, this is a process spec, for example. + google.protobuf.Any spec = 6; + // id of the exec process + string exec_id = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string container_id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string container_id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message CloseIORequest { - string container_id = 1; - string exec_id = 2; - bool stdin = 3; + string container_id = 1; + string exec_id = 2; + bool stdin = 3; } message PauseTaskRequest { - string container_id = 1; + string container_id = 1; } message ResumeTaskRequest { - string container_id = 1; + string container_id = 1; } message ListPidsRequest { - string container_id = 1; + string container_id = 1; } message ListPidsResponse { - // Processes includes the process ID and additional process information - repeated containerd.v1.types.ProcessInfo processes = 1; + // Processes includes the process ID and additional process information + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string container_id = 1; - string parent_checkpoint = 2; - google.protobuf.Any options = 3; + string container_id = 1; + string parent_checkpoint = 2; + google.protobuf.Any options = 3; } message CheckpointTaskResponse { - repeated containerd.types.Descriptor descriptors = 1; + repeated containerd.types.Descriptor descriptors = 1; } message UpdateTaskRequest { - string container_id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string container_id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message MetricsRequest { - repeated string filters = 1; + repeated string filters = 1; } message MetricsResponse { - repeated types.Metric metrics = 1; + repeated types.Metric metrics = 1; } message WaitRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } diff --git a/api/services/transfer/v1/transfer.proto b/api/services/transfer/v1/transfer.proto index a8f25ee593ef2..0ad0ae8e22b16 100644 --- a/api/services/transfer/v1/transfer.proto +++ b/api/services/transfer/v1/transfer.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,16 +24,16 @@ import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/transfer/v1;transfer"; service Transfer { - rpc Transfer(TransferRequest) returns (google.protobuf.Empty); + rpc Transfer(TransferRequest) returns (google.protobuf.Empty); } message TransferRequest { - google.protobuf.Any source = 1; - google.protobuf.Any destination = 2; - TransferOptions options = 3; + google.protobuf.Any source = 1; + google.protobuf.Any destination = 2; + TransferOptions options = 3; } message TransferOptions { - string progress_stream = 1; - // Progress min interval + string progress_stream = 1; + // Progress min interval } diff --git a/api/services/ttrpc/events/v1/events.proto b/api/services/ttrpc/events/v1/events.proto index 449fd5f03b6cd..8b5527328d811 100644 --- a/api/services/ttrpc/events/v1/events.proto +++ b/api/services/ttrpc/events/v1/events.proto @@ -1,37 +1,37 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.events.ttrpc.v1; -import "types/event.proto"; import "google/protobuf/empty.proto"; +import "types/event.proto"; option go_package = "github.com/containerd/containerd/api/services/ttrpc/events/v1;events"; service Events { - // Forward sends an event that has already been packaged into an envelope - // with a timestamp and namespace. - // - // This is useful if earlier timestamping is required or when forwarding on - // behalf of another component, namespace or publisher. - rpc Forward(ForwardRequest) returns (google.protobuf.Empty); + // Forward sends an event that has already been packaged into an envelope + // with a timestamp and namespace. + // + // This is useful if earlier timestamping is required or when forwarding on + // behalf of another component, namespace or publisher. + rpc Forward(ForwardRequest) returns (google.protobuf.Empty); } message ForwardRequest { - containerd.types.Envelope envelope = 1; + containerd.types.Envelope envelope = 1; } diff --git a/api/services/version/v1/version.proto b/api/services/version/v1/version.proto index bd948ff343b3b..c331098e59a75 100644 --- a/api/services/version/v1/version.proto +++ b/api/services/version/v1/version.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,10 +24,10 @@ import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/version/v1;version"; service Version { - rpc Version(google.protobuf.Empty) returns (VersionResponse); + rpc Version(google.protobuf.Empty) returns (VersionResponse); } message VersionResponse { - string version = 1; - string revision = 2; + string version = 1; + string revision = 2; } diff --git a/api/types/descriptor.proto b/api/types/descriptor.proto index faaf416dd10cc..9baadad196583 100644 --- a/api/types/descriptor.proto +++ b/api/types/descriptor.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -26,8 +26,8 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // oci descriptor found in a manifest. // See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor message Descriptor { - string media_type = 1; - string digest = 2; - int64 size = 3; - map annotations = 5; + string media_type = 1; + string digest = 2; + int64 size = 3; + map annotations = 5; } diff --git a/api/types/event.proto b/api/types/event.proto index 4ca4379f1171e..0b9c3fb9375ce 100644 --- a/api/types/event.proto +++ b/api/types/event.proto @@ -1,33 +1,33 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.types; -import "types/fieldpath.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; +import "types/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message Envelope { - option (containerd.types.fieldpath) = true; - google.protobuf.Timestamp timestamp = 1; - string namespace = 2; - string topic = 3; - google.protobuf.Any event = 4; + option (containerd.types.fieldpath) = true; + google.protobuf.Timestamp timestamp = 1; + string namespace = 2; + string topic = 3; + google.protobuf.Any event = 4; } diff --git a/api/types/fieldpath.proto b/api/types/fieldpath.proto index 8b290842b010b..bb5591da5eaa4 100644 --- a/api/types/fieldpath.proto +++ b/api/types/fieldpath.proto @@ -34,9 +34,9 @@ import "google/protobuf/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; extend google.protobuf.FileOptions { - optional bool fieldpath_all = 63300; + optional bool fieldpath_all = 63300; } extend google.protobuf.MessageOptions { - optional bool fieldpath = 64400; + optional bool fieldpath = 64400; } diff --git a/api/types/introspection.proto b/api/types/introspection.proto index 8f3fcb5a48279..5ce83bfe0cdfd 100644 --- a/api/types/introspection.proto +++ b/api/types/introspection.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,24 +23,24 @@ import "google/protobuf/any.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message RuntimeRequest { - string runtime_path = 1; - // Options correspond to CreateTaskRequest.options. - // This is needed to pass the runc binary path, etc. - google.protobuf.Any options = 2; + string runtime_path = 1; + // Options correspond to CreateTaskRequest.options. + // This is needed to pass the runc binary path, etc. + google.protobuf.Any options = 2; } message RuntimeVersion { - string version = 1; - string revision = 2; + string version = 1; + string revision = 2; } message RuntimeInfo { - string name = 1; - RuntimeVersion version = 2; - // Options correspond to RuntimeInfoRequest.Options (contains runc binary path, etc.) - google.protobuf.Any options = 3; - // OCI-compatible runtimes should use https://github.com/opencontainers/runtime-spec/blob/main/features.md - google.protobuf.Any features = 4; - // Annotations of the shim. Irrelevant to features.Annotations. - map annotations = 5; + string name = 1; + RuntimeVersion version = 2; + // Options correspond to RuntimeInfoRequest.Options (contains runc binary path, etc.) + google.protobuf.Any options = 3; + // OCI-compatible runtimes should use https://github.com/opencontainers/runtime-spec/blob/main/features.md + google.protobuf.Any features = 4; + // Annotations of the shim. Irrelevant to features.Annotations. + map annotations = 5; } diff --git a/api/types/metrics.proto b/api/types/metrics.proto index 3e6a7751e37ca..d1a7d49cc3aa7 100644 --- a/api/types/metrics.proto +++ b/api/types/metrics.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,7 +24,7 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message Metric { - google.protobuf.Timestamp timestamp = 1; - string id = 2; - google.protobuf.Any data = 3; + google.protobuf.Timestamp timestamp = 1; + string id = 2; + google.protobuf.Any data = 3; } diff --git a/api/types/mount.proto b/api/types/mount.proto index 2f3b0b622903a..05fd4532bc633 100644 --- a/api/types/mount.proto +++ b/api/types/mount.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -30,36 +30,36 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // The Mount type follows the structure of the mount syscall, including a type, // source, target and options. message Mount { - // Type defines the nature of the mount. - string type = 1; + // Type defines the nature of the mount. + string type = 1; - // Source specifies the name of the mount. Depending on mount type, this - // may be a volume name or a host path, or even ignored. - string source = 2; + // Source specifies the name of the mount. Depending on mount type, this + // may be a volume name or a host path, or even ignored. + string source = 2; - // Target path in container - string target = 3; + // Target path in container + string target = 3; - // Options specifies zero or more fstab style mount options. - repeated string options = 4; + // Options specifies zero or more fstab style mount options. + repeated string options = 4; } message ActiveMount { - Mount mount = 1; + Mount mount = 1; - google.protobuf.Timestamp mounted_at = 2; + google.protobuf.Timestamp mounted_at = 2; - string mount_point = 3; + string mount_point = 3; - map data = 4; + map data = 4; } message ActivationInfo { - string name = 1; + string name = 1; - repeated ActiveMount active = 2; + repeated ActiveMount active = 2; - repeated Mount system = 3; + repeated Mount system = 3; - map labels = 4; + map labels = 4; } diff --git a/api/types/platform.proto b/api/types/platform.proto index 0b9180016de47..c56b6de299306 100644 --- a/api/types/platform.proto +++ b/api/types/platform.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,8 +23,8 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // Platform follows the structure of the OCI platform specification, from // descriptors. message Platform { - string os = 1; - string architecture = 2; - string variant = 3; - string os_version = 4; + string os = 1; + string architecture = 2; + string variant = 3; + string os_version = 4; } diff --git a/api/types/runc/options/oci.proto b/api/types/runc/options/oci.proto index a30b5bbff82aa..b1866374a3a44 100644 --- a/api/types/runc/options/oci.proto +++ b/api/types/runc/options/oci.proto @@ -5,59 +5,59 @@ package containerd.runc.v1; option go_package = "github.com/containerd/containerd/api/types/runc/options;options"; message Options { - // disable pivot root when creating a container - bool no_pivot_root = 1; - // create a new keyring for the container - bool no_new_keyring = 2; - // place the shim in a cgroup - string shim_cgroup = 3; - // set the I/O's pipes uid - uint32 io_uid = 4; - // set the I/O's pipes gid - uint32 io_gid = 5; - // binary name of the runc binary - string binary_name = 6; - // runc root directory - string root = 7; - // criu binary path. - // - // Removed in containerd v2.0: string criu_path = 8; - reserved 8; - // enable systemd cgroups - bool systemd_cgroup = 9; - // criu image path - string criu_image_path = 10; - // criu work path - string criu_work_path = 11; - // task api address, can be a unix domain socket, or vsock address. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string task_api_address = 12; - // task api version, currently supported value is 2 and 3. - uint32 task_api_version = 13; + // disable pivot root when creating a container + bool no_pivot_root = 1; + // create a new keyring for the container + bool no_new_keyring = 2; + // place the shim in a cgroup + string shim_cgroup = 3; + // set the I/O's pipes uid + uint32 io_uid = 4; + // set the I/O's pipes gid + uint32 io_gid = 5; + // binary name of the runc binary + string binary_name = 6; + // runc root directory + string root = 7; + // criu binary path. + // + // Removed in containerd v2.0: string criu_path = 8; + reserved 8; + // enable systemd cgroups + bool systemd_cgroup = 9; + // criu image path + string criu_image_path = 10; + // criu work path + string criu_work_path = 11; + // task api address, can be a unix domain socket, or vsock address. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string task_api_address = 12; + // task api version, currently supported value is 2 and 3. + uint32 task_api_version = 13; } message CheckpointOptions { - // exit the container after a checkpoint - bool exit = 1; - // checkpoint open tcp connections - bool open_tcp = 2; - // checkpoint external unix sockets - bool external_unix_sockets = 3; - // checkpoint terminals (ptys) - bool terminal = 4; - // allow checkpointing of file locks - bool file_locks = 5; - // restore provided namespaces as empty namespaces - repeated string empty_namespaces = 6; - // set the cgroups mode, soft, full, strict - string cgroups_mode = 7; - // checkpoint image path - string image_path = 8; - // checkpoint work path - string work_path = 9; + // exit the container after a checkpoint + bool exit = 1; + // checkpoint open tcp connections + bool open_tcp = 2; + // checkpoint external unix sockets + bool external_unix_sockets = 3; + // checkpoint terminals (ptys) + bool terminal = 4; + // allow checkpointing of file locks + bool file_locks = 5; + // restore provided namespaces as empty namespaces + repeated string empty_namespaces = 6; + // set the cgroups mode, soft, full, strict + string cgroups_mode = 7; + // checkpoint image path + string image_path = 8; + // checkpoint work path + string work_path = 9; } message ProcessDetails { - // exec process id if the process is managed by a shim - string exec_id = 1; + // exec process id if the process is managed by a shim + string exec_id = 1; } diff --git a/api/types/runtimeoptions/v1/api.proto b/api/types/runtimeoptions/v1/api.proto index f0a7d56b8b1fa..95864dcf3b458 100644 --- a/api/types/runtimeoptions/v1/api.proto +++ b/api/types/runtimeoptions/v1/api.proto @@ -6,12 +6,12 @@ package runtimeoptions.v1; option go_package = "github.com/containerd/containerd/api/types/runtimeoptions/v1;runtimeoptions"; message Options { - // TypeUrl specifies the type of the content inside the config file. - string type_url = 1; - // ConfigPath specifies the filesystem location of the config file - // used by the runtime. - string config_path = 2; - // Blob specifies an in-memory TOML blob passed from containerd's configuration section - // for this runtime. This will be used if config_path is not specified. - bytes config_body = 3; + // TypeUrl specifies the type of the content inside the config file. + string type_url = 1; + // ConfigPath specifies the filesystem location of the config file + // used by the runtime. + string config_path = 2; + // Blob specifies an in-memory TOML blob passed from containerd's configuration section + // for this runtime. This will be used if config_path is not specified. + bytes config_body = 3; } diff --git a/api/types/sandbox.proto b/api/types/sandbox.proto index b0bf233b954bf..023644192579d 100644 --- a/api/types/sandbox.proto +++ b/api/types/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -26,29 +26,28 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // Sandbox represents a sandbox metadata object that keeps all info required by controller to // work with a particular instance. message Sandbox { - // SandboxID is a unique instance identifier within namespace - string sandbox_id = 1; - message Runtime { - // Name is the name of the runtime. - string name = 1; - // Options specify additional runtime initialization options for the shim (this data will be available in StartShim). - // Typically this data expected to be runtime shim implementation specific. - google.protobuf.Any options = 2; - } - // Runtime specifies which runtime to use for executing this container. - Runtime runtime = 2; - // Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the - // bundle directory (similary to OCI spec). - google.protobuf.Any spec = 3; - // Labels provides an area to include arbitrary data on containers. - map labels = 4; - // CreatedAt is the time the container was first created. - google.protobuf.Timestamp created_at = 5; - // UpdatedAt is the last time the container was mutated. - google.protobuf.Timestamp updated_at = 6; - // Extensions allow clients to provide optional blobs that can be handled by runtime. - map extensions = 7; - // Sandboxer is the name of the sandbox controller who manages the sandbox. - string sandboxer = 10; - + // SandboxID is a unique instance identifier within namespace + string sandbox_id = 1; + message Runtime { + // Name is the name of the runtime. + string name = 1; + // Options specify additional runtime initialization options for the shim (this data will be available in StartShim). + // Typically this data expected to be runtime shim implementation specific. + google.protobuf.Any options = 2; + } + // Runtime specifies which runtime to use for executing this container. + Runtime runtime = 2; + // Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the + // bundle directory (similary to OCI spec). + google.protobuf.Any spec = 3; + // Labels provides an area to include arbitrary data on containers. + map labels = 4; + // CreatedAt is the time the container was first created. + google.protobuf.Timestamp created_at = 5; + // UpdatedAt is the last time the container was mutated. + google.protobuf.Timestamp updated_at = 6; + // Extensions allow clients to provide optional blobs that can be handled by runtime. + map extensions = 7; + // Sandboxer is the name of the sandbox controller who manages the sandbox. + string sandboxer = 10; } diff --git a/api/types/task/task.proto b/api/types/task/task.proto index afc8e94bb4770..3a06236fac716 100644 --- a/api/types/task/task.proto +++ b/api/types/task/task.proto @@ -1,55 +1,55 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.v1.types; -import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types/task"; enum Status { - UNKNOWN = 0; - CREATED = 1; - RUNNING = 2; - STOPPED = 3; - PAUSED = 4; - PAUSING = 5; + UNKNOWN = 0; + CREATED = 1; + RUNNING = 2; + STOPPED = 3; + PAUSED = 4; + PAUSING = 5; } message Process { - string container_id = 1; - string id = 2; - uint32 pid = 3; - Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; + string container_id = 1; + string id = 2; + uint32 pid = 3; + Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; } message ProcessInfo { - // PID is the process ID. - uint32 pid = 1; - // Info contains additional process information. - // - // Info varies by platform. - google.protobuf.Any info = 2; + // PID is the process ID. + uint32 pid = 1; + // Info contains additional process information. + // + // Info varies by platform. + google.protobuf.Any info = 2; } diff --git a/api/types/transfer/imagestore.proto b/api/types/transfer/imagestore.proto index fbcaa567c5095..c3c14c9b10fc6 100644 --- a/api/types/transfer/imagestore.proto +++ b/api/types/transfer/imagestore.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,60 +23,60 @@ import "types/platform.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message ImageStore { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; - // Content filters + // Content filters - repeated types.Platform platforms = 3; - bool all_metadata = 4; - uint32 manifest_limit = 5; + repeated types.Platform platforms = 3; + bool all_metadata = 4; + uint32 manifest_limit = 5; - // Import naming + // Import naming - // extra_references are used to set image names on imports of sub-images from the index - repeated ImageReference extra_references = 6; + // extra_references are used to set image names on imports of sub-images from the index + repeated ImageReference extra_references = 6; - // Unpack Configuration, multiple allowed + // Unpack Configuration, multiple allowed - repeated UnpackConfiguration unpacks = 10; + repeated UnpackConfiguration unpacks = 10; } message UnpackConfiguration { - // platform is the platform to unpack for, used for resolving manifest and snapshotter - // if not provided - types.Platform platform = 1; + // platform is the platform to unpack for, used for resolving manifest and snapshotter + // if not provided + types.Platform platform = 1; - // snapshotter to unpack to, if not provided default for platform shoudl be used - string snapshotter = 2; + // snapshotter to unpack to, if not provided default for platform shoudl be used + string snapshotter = 2; } // ImageReference is used to create or find a reference for an image message ImageReference { - string name = 1; - - // is_prefix determines whether the Name should be considered - // a prefix (without tag or digest). - // For lookup, this may allow matching multiple tags. - // For store, this must have a tag or digest added. - bool is_prefix = 2; - - // allow_overwrite allows overwriting or ignoring the name if - // another reference is provided (such as through an annotation). - // Only used if IsPrefix is true. - bool allow_overwrite = 3; - - // add_digest adds the manifest digest to the reference. - // For lookup, this allows matching tags with any digest. - // For store, this allows adding the digest to the name. - // Only used if IsPrefix is true. - bool add_digest = 4; - - // skip_named_digest only considers digest references which do not - // have a non-digested named reference. - // For lookup, this will deduplicate digest references when there is a named match. - // For store, this only adds this digest reference when there is no matching full - // name reference from the prefix. - // Only used if IsPrefix is true. - bool skip_named_digest = 5; + string name = 1; + + // is_prefix determines whether the Name should be considered + // a prefix (without tag or digest). + // For lookup, this may allow matching multiple tags. + // For store, this must have a tag or digest added. + bool is_prefix = 2; + + // allow_overwrite allows overwriting or ignoring the name if + // another reference is provided (such as through an annotation). + // Only used if IsPrefix is true. + bool allow_overwrite = 3; + + // add_digest adds the manifest digest to the reference. + // For lookup, this allows matching tags with any digest. + // For store, this allows adding the digest to the name. + // Only used if IsPrefix is true. + bool add_digest = 4; + + // skip_named_digest only considers digest references which do not + // have a non-digested named reference. + // For lookup, this will deduplicate digest references when there is a named match. + // For store, this only adds this digest reference when there is no matching full + // name reference from the prefix. + // Only used if IsPrefix is true. + bool skip_named_digest = 5; } diff --git a/api/types/transfer/importexport.proto b/api/types/transfer/importexport.proto index 7660fa0e30603..7d6c754020346 100644 --- a/api/types/transfer/importexport.proto +++ b/api/types/transfer/importexport.proto @@ -1,52 +1,52 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.types.transfer; -option go_package = "github.com/containerd/containerd/api/types/transfer"; - import "types/platform.proto"; +option go_package = "github.com/containerd/containerd/api/types/transfer"; + message ImageImportStream { - // Stream is used to identify the binary input stream for the import operation. - // The stream uses the transfer binary stream protocol with the client as the sender. - // The binary data is expected to be a raw tar stream. - string stream = 1; + // Stream is used to identify the binary input stream for the import operation. + // The stream uses the transfer binary stream protocol with the client as the sender. + // The binary data is expected to be a raw tar stream. + string stream = 1; - string media_type = 2; + string media_type = 2; - bool force_compress = 3; + bool force_compress = 3; } message ImageExportStream { - // Stream is used to identify the binary output stream for the export operation. - // The stream uses the transfer binary stream protocol with the server as the sender. - // The binary data is expected to be a raw tar stream. - string stream = 1; - - string media_type = 2; - - // The specified platforms - repeated types.Platform platforms = 3; - // Whether to include all platforms - bool all_platforms = 4; - // Skips the creation of the Docker compatible manifest.json file - bool skip_compatibility_manifest = 5; - // Excludes non-distributable blobs such as Windows base layers. - bool skip_non_distributable = 6; + // Stream is used to identify the binary output stream for the export operation. + // The stream uses the transfer binary stream protocol with the server as the sender. + // The binary data is expected to be a raw tar stream. + string stream = 1; + + string media_type = 2; + + // The specified platforms + repeated types.Platform platforms = 3; + // Whether to include all platforms + bool all_platforms = 4; + // Skips the creation of the Docker compatible manifest.json file + bool skip_compatibility_manifest = 5; + // Excludes non-distributable blobs such as Windows base layers. + bool skip_non_distributable = 6; } diff --git a/api/types/transfer/progress.proto b/api/types/transfer/progress.proto index 712ed6a061d56..81858dbcdf5bc 100644 --- a/api/types/transfer/progress.proto +++ b/api/types/transfer/progress.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,10 +23,10 @@ import "types/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message Progress { - string event = 1; - string name = 2; - repeated string parents = 3; - int64 progress = 4; - int64 total = 5; - containerd.types.Descriptor desc = 6; + string event = 1; + string name = 2; + repeated string parents = 3; + int64 progress = 4; + int64 total = 5; + containerd.types.Descriptor desc = 6; } diff --git a/api/types/transfer/registry.proto b/api/types/transfer/registry.proto index 88248fd56fea7..cf614d2fdd4f1 100644 --- a/api/types/transfer/registry.proto +++ b/api/types/transfer/registry.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,75 +23,75 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message OCIRegistry { - string reference = 1; - RegistryResolver resolver = 2; + string reference = 1; + RegistryResolver resolver = 2; } enum HTTPDebug { - DISABLED = 0; - // Enable HTTP debugging - DEBUG = 1; - // Enable HTTP requests tracing - TRACE = 2; - // Enable both HTTP debugging and requests tracing - BOTH = 3; + DISABLED = 0; + // Enable HTTP debugging + DEBUG = 1; + // Enable HTTP requests tracing + TRACE = 2; + // Enable both HTTP debugging and requests tracing + BOTH = 3; } message RegistryResolver { - // auth_stream is used to refer to a stream which auth callbacks may be - // made on. - string auth_stream = 1; + // auth_stream is used to refer to a stream which auth callbacks may be + // made on. + string auth_stream = 1; - // Headers - map headers = 2; + // Headers + map headers = 2; - string host_dir = 3; + string host_dir = 3; - string default_scheme = 4; - // Force skip verify - // CA callback? Client TLS callback? + string default_scheme = 4; + // Force skip verify + // CA callback? Client TLS callback? - // Whether to debug/trace HTTP requests to OCI registry. - HTTPDebug http_debug = 5; + // Whether to debug/trace HTTP requests to OCI registry. + HTTPDebug http_debug = 5; - // Stream ID to use for HTTP logs (when logs are streamed to client). - // When empty, logs are written to containerd logs. - string logs_stream = 6; + // Stream ID to use for HTTP logs (when logs are streamed to client). + // When empty, logs are written to containerd logs. + string logs_stream = 6; } // AuthRequest is sent as a callback on a stream message AuthRequest { - // host is the registry host - string host = 1; + // host is the registry host + string host = 1; - // reference is the namespace and repository name requested from the registry - string reference = 2; + // reference is the namespace and repository name requested from the registry + string reference = 2; - // wwwauthenticate is the HTTP WWW-Authenticate header values returned from the registry - repeated string wwwauthenticate = 3; + // wwwauthenticate is the HTTP WWW-Authenticate header values returned from the registry + repeated string wwwauthenticate = 3; } enum AuthType { - NONE = 0; + NONE = 0; - // CREDENTIALS is used to exchange username/password for access token - // using an oauth or "Docker Registry Token" server - CREDENTIALS = 1; + // CREDENTIALS is used to exchange username/password for access token + // using an oauth or "Docker Registry Token" server + CREDENTIALS = 1; - // REFRESH is used to exchange secret for access token using an oauth - // or "Docker Registry Token" server - REFRESH = 2; + // REFRESH is used to exchange secret for access token using an oauth + // or "Docker Registry Token" server + REFRESH = 2; - // HEADER is used to set the HTTP Authorization header to secret - // directly for the registry. - // Value should be ` ` - HEADER = 3; + // HEADER is used to set the HTTP Authorization header to secret + // directly for the registry. + // Value should be ` ` + HEADER = 3; } message AuthResponse { - AuthType authType = 1; - string secret = 2; - string username = 3; - google.protobuf.Timestamp expire_at = 4; - // TODO: Stream error + AuthType authType = 1; + string secret = 2; + string username = 3; + google.protobuf.Timestamp expire_at = 4; + // TODO: Stream error } diff --git a/api/types/transfer/streaming.proto b/api/types/transfer/streaming.proto index 234956c2c2c2f..e01e70360d8af 100644 --- a/api/types/transfer/streaming.proto +++ b/api/types/transfer/streaming.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -21,9 +21,9 @@ package containerd.types.transfer; option go_package = "github.com/containerd/containerd/api/types/transfer"; message Data { - bytes data = 1; + bytes data = 1; } message WindowUpdate { - int32 update = 1; + int32 update = 1; } diff --git a/vendor/github.com/containerd/containerd/api/events/container.proto b/vendor/github.com/containerd/containerd/api/events/container.proto index 306a580958e6a..6592c495f107f 100644 --- a/vendor/github.com/containerd/containerd/api/events/container.proto +++ b/vendor/github.com/containerd/containerd/api/events/container.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -25,22 +25,22 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ContainerCreate { - string id = 1; - string image = 2; - message Runtime { - string name = 1; - google.protobuf.Any options = 2; - } - Runtime runtime = 3; + string id = 1; + string image = 2; + message Runtime { + string name = 1; + google.protobuf.Any options = 2; + } + Runtime runtime = 3; } message ContainerUpdate { - string id = 1; - string image = 2; - map labels = 3; - string snapshot_key = 4; + string id = 1; + string image = 2; + map labels = 3; + string snapshot_key = 4; } message ContainerDelete { - string id = 1; + string id = 1; } diff --git a/vendor/github.com/containerd/containerd/api/events/content.proto b/vendor/github.com/containerd/containerd/api/events/content.proto index 3feb58fe6972a..13e4d7fb8ab7d 100644 --- a/vendor/github.com/containerd/containerd/api/events/content.proto +++ b/vendor/github.com/containerd/containerd/api/events/content.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,10 +24,10 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ContentCreate { - string digest = 1; - int64 size = 2; + string digest = 1; + int64 size = 2; } message ContentDelete { - string digest = 1; + string digest = 1; } diff --git a/vendor/github.com/containerd/containerd/api/events/image.proto b/vendor/github.com/containerd/containerd/api/events/image.proto index e35049808bfd9..a6baeb643a8d4 100644 --- a/vendor/github.com/containerd/containerd/api/events/image.proto +++ b/vendor/github.com/containerd/containerd/api/events/image.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,15 +24,15 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message ImageCreate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message ImageUpdate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message ImageDelete { - string name = 1; + string name = 1; } diff --git a/vendor/github.com/containerd/containerd/api/events/namespace.proto b/vendor/github.com/containerd/containerd/api/events/namespace.proto index 8f4bc2f341519..89a3d20cc8cae 100644 --- a/vendor/github.com/containerd/containerd/api/events/namespace.proto +++ b/vendor/github.com/containerd/containerd/api/events/namespace.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,15 +24,15 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message NamespaceCreate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message NamespaceUpdate { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; } message NamespaceDelete { - string name = 1; + string name = 1; } diff --git a/vendor/github.com/containerd/containerd/api/events/sandbox.proto b/vendor/github.com/containerd/containerd/api/events/sandbox.proto index f1c5195e5a721..f70fa7e3821a3 100644 --- a/vendor/github.com/containerd/containerd/api/events/sandbox.proto +++ b/vendor/github.com/containerd/containerd/api/events/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,15 +23,15 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; message SandboxCreate { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxStart { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxExit { - string sandbox_id = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + string sandbox_id = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } diff --git a/vendor/github.com/containerd/containerd/api/events/snapshot.proto b/vendor/github.com/containerd/containerd/api/events/snapshot.proto index 08419bfa6a264..75be997394508 100644 --- a/vendor/github.com/containerd/containerd/api/events/snapshot.proto +++ b/vendor/github.com/containerd/containerd/api/events/snapshot.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,18 +24,18 @@ option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message SnapshotPrepare { - string key = 1; - string parent = 2; - string snapshotter = 5; + string key = 1; + string parent = 2; + string snapshotter = 5; } message SnapshotCommit { - string key = 1; - string name = 2; - string snapshotter = 5; + string key = 1; + string name = 2; + string snapshotter = 5; } message SnapshotRemove { - string key = 1; - string snapshotter = 5; + string key = 1; + string snapshotter = 5; } diff --git a/vendor/github.com/containerd/containerd/api/events/task.proto b/vendor/github.com/containerd/containerd/api/events/task.proto index 68453fff0eb95..90c55939d81ed 100644 --- a/vendor/github.com/containerd/containerd/api/events/task.proto +++ b/vendor/github.com/containerd/containerd/api/events/task.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -19,75 +19,75 @@ syntax = "proto3"; package containerd.events; import "google/protobuf/timestamp.proto"; -import "types/mount.proto"; import "types/fieldpath.proto"; +import "types/mount.proto"; option go_package = "github.com/containerd/containerd/api/events;events"; option (containerd.types.fieldpath_all) = true; message TaskCreate { - string container_id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - TaskIO io = 4; - string checkpoint = 5; - uint32 pid = 6; + string container_id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + TaskIO io = 4; + string checkpoint = 5; + uint32 pid = 6; } message TaskStart { - string container_id = 1; - uint32 pid = 2; + string container_id = 1; + uint32 pid = 2; } message TaskDelete { - string container_id = 1; - uint32 pid = 2; - uint32 exit_status = 3; - google.protobuf.Timestamp exited_at = 4; - // id is the specific exec. By default if omitted will be `""` thus matches - // the init exec of the task matching `container_id`. - string id = 5; + string container_id = 1; + uint32 pid = 2; + uint32 exit_status = 3; + google.protobuf.Timestamp exited_at = 4; + // id is the specific exec. By default if omitted will be `""` thus matches + // the init exec of the task matching `container_id`. + string id = 5; } message TaskIO { - string stdin = 1; - string stdout = 2; - string stderr = 3; - bool terminal = 4; + string stdin = 1; + string stdout = 2; + string stderr = 3; + bool terminal = 4; } message TaskExit { - string container_id = 1; - string id = 2; - uint32 pid = 3; - uint32 exit_status = 4; - google.protobuf.Timestamp exited_at = 5; + string container_id = 1; + string id = 2; + uint32 pid = 3; + uint32 exit_status = 4; + google.protobuf.Timestamp exited_at = 5; } message TaskOOM { - string container_id = 1; + string container_id = 1; } message TaskExecAdded { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message TaskExecStarted { - string container_id = 1; - string exec_id = 2; - uint32 pid = 3; + string container_id = 1; + string exec_id = 2; + uint32 pid = 3; } message TaskPaused { - string container_id = 1; + string container_id = 1; } message TaskResumed { - string container_id = 1; + string container_id = 1; } message TaskCheckpointed { - string container_id = 1; - string checkpoint = 2; + string container_id = 1; + string checkpoint = 2; } diff --git a/vendor/github.com/containerd/containerd/api/runtime/sandbox/v1/sandbox.proto b/vendor/github.com/containerd/containerd/api/runtime/sandbox/v1/sandbox.proto index b917111182fe3..3d31ae8734934 100644 --- a/vendor/github.com/containerd/containerd/api/runtime/sandbox/v1/sandbox.proto +++ b/vendor/github.com/containerd/containerd/api/runtime/sandbox/v1/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -20,10 +20,9 @@ package containerd.runtime.sandbox.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; - +import "types/metrics.proto"; import "types/mount.proto"; import "types/platform.proto"; -import "types/metrics.proto"; option go_package = "github.com/containerd/containerd/api/runtime/sandbox/v1;sandbox"; @@ -31,119 +30,119 @@ option go_package = "github.com/containerd/containerd/api/runtime/sandbox/v1;san // A typical example of sandbox is microVM or pause container - an entity that groups containers and/or // holds resources relevant for this group. service Sandbox { - // CreateSandbox will be called right after sandbox shim instance launched. - // It is a good place to initialize sandbox environment. - rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); + // CreateSandbox will be called right after sandbox shim instance launched. + // It is a good place to initialize sandbox environment. + rpc CreateSandbox(CreateSandboxRequest) returns (CreateSandboxResponse); - // StartSandbox will start a previously created sandbox. - rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); + // StartSandbox will start a previously created sandbox. + rpc StartSandbox(StartSandboxRequest) returns (StartSandboxResponse); - // Platform queries the platform the sandbox is going to run containers on. - // containerd will use this to generate a proper OCI spec. - rpc Platform(PlatformRequest) returns (PlatformResponse); + // Platform queries the platform the sandbox is going to run containers on. + // containerd will use this to generate a proper OCI spec. + rpc Platform(PlatformRequest) returns (PlatformResponse); - // StopSandbox will stop existing sandbox instance - rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); + // StopSandbox will stop existing sandbox instance + rpc StopSandbox(StopSandboxRequest) returns (StopSandboxResponse); - // WaitSandbox blocks until sandbox exits. - rpc WaitSandbox(WaitSandboxRequest) returns (WaitSandboxResponse); + // WaitSandbox blocks until sandbox exits. + rpc WaitSandbox(WaitSandboxRequest) returns (WaitSandboxResponse); - // SandboxStatus will return current status of the running sandbox instance - rpc SandboxStatus(SandboxStatusRequest) returns (SandboxStatusResponse); + // SandboxStatus will return current status of the running sandbox instance + rpc SandboxStatus(SandboxStatusRequest) returns (SandboxStatusResponse); - // PingSandbox is a lightweight API call to check whether sandbox alive. - rpc PingSandbox(PingRequest) returns (PingResponse); + // PingSandbox is a lightweight API call to check whether sandbox alive. + rpc PingSandbox(PingRequest) returns (PingResponse); - // ShutdownSandbox must shutdown shim instance. - rpc ShutdownSandbox(ShutdownSandboxRequest) returns (ShutdownSandboxResponse); + // ShutdownSandbox must shutdown shim instance. + rpc ShutdownSandbox(ShutdownSandboxRequest) returns (ShutdownSandboxResponse); - // SandboxMetrics retrieves metrics about a sandbox instance. - rpc SandboxMetrics(SandboxMetricsRequest) returns (SandboxMetricsResponse); + // SandboxMetrics retrieves metrics about a sandbox instance. + rpc SandboxMetrics(SandboxMetricsRequest) returns (SandboxMetricsResponse); } message CreateSandboxRequest { - string sandbox_id = 1; - string bundle_path = 2; - repeated containerd.types.Mount rootfs = 3; - google.protobuf.Any options = 4; - string netns_path = 5; - map annotations = 6; + string sandbox_id = 1; + string bundle_path = 2; + repeated containerd.types.Mount rootfs = 3; + google.protobuf.Any options = 4; + string netns_path = 5; + map annotations = 6; } message CreateSandboxResponse {} message StartSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StartSandboxResponse { - uint32 pid = 1; - google.protobuf.Timestamp created_at = 2; + uint32 pid = 1; + google.protobuf.Timestamp created_at = 2; } message PlatformRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message PlatformResponse { - containerd.types.Platform platform = 1; + containerd.types.Platform platform = 1; } message StopSandboxRequest { - string sandbox_id = 1; - uint32 timeout_secs = 2; + string sandbox_id = 1; + uint32 timeout_secs = 2; } message StopSandboxResponse {} message UpdateSandboxRequest { - string sandbox_id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string sandbox_id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message WaitSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message WaitSandboxResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message UpdateSandboxResponse {} message SandboxStatusRequest { - string sandbox_id = 1; - bool verbose = 2; + string sandbox_id = 1; + bool verbose = 2; } message SandboxStatusResponse { - string sandbox_id = 1; - uint32 pid = 2; - string state = 3; - map info = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp exited_at = 6; - google.protobuf.Any extra = 7; + string sandbox_id = 1; + uint32 pid = 2; + string state = 3; + map info = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp exited_at = 6; + google.protobuf.Any extra = 7; } message PingRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message PingResponse {} message ShutdownSandboxRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message ShutdownSandboxResponse {} message SandboxMetricsRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message SandboxMetricsResponse { - containerd.types.Metric metrics = 1; + containerd.types.Metric metrics = 1; } diff --git a/vendor/github.com/containerd/containerd/api/runtime/task/v2/shim.proto b/vendor/github.com/containerd/containerd/api/runtime/task/v2/shim.proto index 4035bca778344..6d9c36e03b5ff 100644 --- a/vendor/github.com/containerd/containerd/api/runtime/task/v2/shim.proto +++ b/vendor/github.com/containerd/containerd/api/runtime/task/v2/shim.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -31,171 +31,170 @@ option go_package = "github.com/containerd/containerd/api/runtime/task/v2;task"; // each container and allows reattaching to the IO and receiving the exit status // for the container processes. service Task { - rpc State(StateRequest) returns (StateResponse); - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - rpc Start(StartRequest) returns (StartResponse); - rpc Delete(DeleteRequest) returns (DeleteResponse); - rpc Pids(PidsRequest) returns (PidsResponse); - rpc Pause(PauseRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeRequest) returns (google.protobuf.Empty); - rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); - rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Wait(WaitRequest) returns (WaitResponse); - rpc Stats(StatsRequest) returns (StatsResponse); - rpc Connect(ConnectRequest) returns (ConnectResponse); - rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); + rpc State(StateRequest) returns (StateResponse); + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + rpc Start(StartRequest) returns (StartResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Pids(PidsRequest) returns (PidsResponse); + rpc Pause(PauseRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeRequest) returns (google.protobuf.Empty); + rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); + rpc Kill(KillRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Wait(WaitRequest) returns (WaitResponse); + rpc Stats(StatsRequest) returns (StatsResponse); + rpc Connect(ConnectRequest) returns (ConnectResponse); + rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); } message CreateTaskRequest { - string id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - bool terminal = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - string checkpoint = 8; - string parent_checkpoint = 9; - google.protobuf.Any options = 10; + string id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + bool terminal = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + string checkpoint = 8; + string parent_checkpoint = 9; + google.protobuf.Any options = 10; } message CreateTaskResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message DeleteResponse { - uint32 pid = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + uint32 pid = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } message ExecProcessRequest { - string id = 1; - string exec_id = 2; - bool terminal = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - google.protobuf.Any spec = 7; + string id = 1; + string exec_id = 2; + bool terminal = 3; + string stdin = 4; + string stdout = 5; + string stderr = 6; + google.protobuf.Any spec = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message StateRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StateResponse { - string id = 1; - string bundle = 2; - uint32 pid = 3; - containerd.v1.types.Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; - string exec_id = 11; + string id = 1; + string bundle = 2; + uint32 pid = 3; + containerd.v1.types.Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; + string exec_id = 11; } message KillRequest { - string id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message CloseIORequest { - string id = 1; - string exec_id = 2; - bool stdin = 3; + string id = 1; + string exec_id = 2; + bool stdin = 3; } message PidsRequest { - string id = 1; + string id = 1; } message PidsResponse { - repeated containerd.v1.types.ProcessInfo processes = 1; + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string id = 1; - string path = 2; - google.protobuf.Any options = 3; + string id = 1; + string path = 2; + google.protobuf.Any options = 3; } message UpdateTaskRequest { - string id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message StartRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message WaitRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message StatsRequest { - string id = 1; + string id = 1; } message StatsResponse { - google.protobuf.Any stats = 1; + google.protobuf.Any stats = 1; } message ConnectRequest { - string id = 1; + string id = 1; } message ConnectResponse { - uint32 shim_pid = 1; - uint32 task_pid = 2; - string version = 3; + uint32 shim_pid = 1; + uint32 task_pid = 2; + string version = 3; } message ShutdownRequest { - string id = 1; - bool now = 2; + string id = 1; + bool now = 2; } message PauseRequest { - string id = 1; + string id = 1; } message ResumeRequest { - string id = 1; + string id = 1; } diff --git a/vendor/github.com/containerd/containerd/api/runtime/task/v3/shim.proto b/vendor/github.com/containerd/containerd/api/runtime/task/v3/shim.proto index dc8297333c036..2dffd52db80ad 100644 --- a/vendor/github.com/containerd/containerd/api/runtime/task/v3/shim.proto +++ b/vendor/github.com/containerd/containerd/api/runtime/task/v3/shim.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -31,171 +31,170 @@ option go_package = "github.com/containerd/containerd/api/runtime/task/v3;task"; // each container and allows reattaching to the IO and receiving the exit status // for the container processes. service Task { - rpc State(StateRequest) returns (StateResponse); - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - rpc Start(StartRequest) returns (StartResponse); - rpc Delete(DeleteRequest) returns (DeleteResponse); - rpc Pids(PidsRequest) returns (PidsResponse); - rpc Pause(PauseRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeRequest) returns (google.protobuf.Empty); - rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); - rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Wait(WaitRequest) returns (WaitResponse); - rpc Stats(StatsRequest) returns (StatsResponse); - rpc Connect(ConnectRequest) returns (ConnectResponse); - rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); + rpc State(StateRequest) returns (StateResponse); + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + rpc Start(StartRequest) returns (StartResponse); + rpc Delete(DeleteRequest) returns (DeleteResponse); + rpc Pids(PidsRequest) returns (PidsResponse); + rpc Pause(PauseRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeRequest) returns (google.protobuf.Empty); + rpc Checkpoint(CheckpointTaskRequest) returns (google.protobuf.Empty); + rpc Kill(KillRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Wait(WaitRequest) returns (WaitResponse); + rpc Stats(StatsRequest) returns (StatsResponse); + rpc Connect(ConnectRequest) returns (ConnectResponse); + rpc Shutdown(ShutdownRequest) returns (google.protobuf.Empty); } message CreateTaskRequest { - string id = 1; - string bundle = 2; - repeated containerd.types.Mount rootfs = 3; - bool terminal = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - string checkpoint = 8; - string parent_checkpoint = 9; - google.protobuf.Any options = 10; + string id = 1; + string bundle = 2; + repeated containerd.types.Mount rootfs = 3; + bool terminal = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + string checkpoint = 8; + string parent_checkpoint = 9; + google.protobuf.Any options = 10; } message CreateTaskResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message DeleteResponse { - uint32 pid = 1; - uint32 exit_status = 2; - google.protobuf.Timestamp exited_at = 3; + uint32 pid = 1; + uint32 exit_status = 2; + google.protobuf.Timestamp exited_at = 3; } message ExecProcessRequest { - string id = 1; - string exec_id = 2; - bool terminal = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - google.protobuf.Any spec = 7; + string id = 1; + string exec_id = 2; + bool terminal = 3; + string stdin = 4; + string stdout = 5; + string stderr = 6; + google.protobuf.Any spec = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message StateRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StateResponse { - string id = 1; - string bundle = 2; - uint32 pid = 3; - containerd.v1.types.Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; - string exec_id = 11; + string id = 1; + string bundle = 2; + uint32 pid = 3; + containerd.v1.types.Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; + string exec_id = 11; } message KillRequest { - string id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message CloseIORequest { - string id = 1; - string exec_id = 2; - bool stdin = 3; + string id = 1; + string exec_id = 2; + bool stdin = 3; } message PidsRequest { - string id = 1; + string id = 1; } message PidsResponse { - repeated containerd.v1.types.ProcessInfo processes = 1; + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string id = 1; - string path = 2; - google.protobuf.Any options = 3; + string id = 1; + string path = 2; + google.protobuf.Any options = 3; } message UpdateTaskRequest { - string id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message StartRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message WaitRequest { - string id = 1; - string exec_id = 2; + string id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message StatsRequest { - string id = 1; + string id = 1; } message StatsResponse { - google.protobuf.Any stats = 1; + google.protobuf.Any stats = 1; } message ConnectRequest { - string id = 1; + string id = 1; } message ConnectResponse { - uint32 shim_pid = 1; - uint32 task_pid = 2; - string version = 3; + uint32 shim_pid = 1; + uint32 task_pid = 2; + string version = 3; } message ShutdownRequest { - string id = 1; - bool now = 2; + string id = 1; + bool now = 2; } message PauseRequest { - string id = 1; + string id = 1; } message ResumeRequest { - string id = 1; + string id = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto b/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto index 3de07ffbd6e6a..d2460bf05762c 100644 --- a/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto +++ b/vendor/github.com/containerd/containerd/api/services/containers/v1/containers.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -42,114 +42,114 @@ option go_package = "github.com/containerd/containerd/api/services/containers/v1 // runtime, or changes as the "container" is started and stops, it probably // doesn't belong on this object. service Containers { - rpc Get(GetContainerRequest) returns (GetContainerResponse); - rpc List(ListContainersRequest) returns (ListContainersResponse); - rpc ListStream(ListContainersRequest) returns (stream ListContainerMessage); - rpc Create(CreateContainerRequest) returns (CreateContainerResponse); - rpc Update(UpdateContainerRequest) returns (UpdateContainerResponse); - rpc Delete(DeleteContainerRequest) returns (google.protobuf.Empty); + rpc Get(GetContainerRequest) returns (GetContainerResponse); + rpc List(ListContainersRequest) returns (ListContainersResponse); + rpc ListStream(ListContainersRequest) returns (stream ListContainerMessage); + rpc Create(CreateContainerRequest) returns (CreateContainerResponse); + rpc Update(UpdateContainerRequest) returns (UpdateContainerResponse); + rpc Delete(DeleteContainerRequest) returns (google.protobuf.Empty); } message Container { - // ID is the user-specified identifier. - // - // This field may not be updated. - string id = 1; - - // Labels provides an area to include arbitrary data on containers. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - // - // Note that to add a new value to this field, read the existing set and - // include the entire result in the update call. - map labels = 2; - - // Image contains the reference of the image used to build the - // specification and snapshots for running this container. - // - // If this field is updated, the spec and rootfs needed to updated, as well. - string image = 3; - - message Runtime { - // Name is the name of the runtime. - string name = 1; - // Options specify additional runtime initialization options. - google.protobuf.Any options = 2; - } - // Runtime specifies which runtime to use for executing this container. - Runtime runtime = 4; - - // Spec to be used when creating the container. This is runtime specific. - google.protobuf.Any spec = 5; - - // Snapshotter specifies the snapshotter name used for rootfs - string snapshotter = 6; - - // SnapshotKey specifies the snapshot key to use for the container's root - // filesystem. When starting a task from this container, a caller should - // look up the mounts from the snapshot service and include those on the - // task create request. - // - // Snapshots referenced in this field will not be garbage collected. - // - // This field is set to empty when the rootfs is not a snapshot. - // - // This field may be updated. - string snapshot_key = 7; - - // CreatedAt is the time the container was first created. - google.protobuf.Timestamp created_at = 8; - - // UpdatedAt is the last time the container was mutated. - google.protobuf.Timestamp updated_at = 9; - - // Extensions allow clients to provide zero or more blobs that are directly - // associated with the container. One may provide protobuf, json, or other - // encoding formats. The primary use of this is to further decorate the - // container object with fields that may be specific to a client integration. - // - // The key portion of this map should identify a "name" for the extension - // that should be unique against other extensions. When updating extension - // data, one should only update the specified extension using field paths - // to select a specific map key. - map extensions = 10; - - // Sandbox ID this container belongs to. - string sandbox = 11; + // ID is the user-specified identifier. + // + // This field may not be updated. + string id = 1; + + // Labels provides an area to include arbitrary data on containers. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + // + // Note that to add a new value to this field, read the existing set and + // include the entire result in the update call. + map labels = 2; + + // Image contains the reference of the image used to build the + // specification and snapshots for running this container. + // + // If this field is updated, the spec and rootfs needed to updated, as well. + string image = 3; + + message Runtime { + // Name is the name of the runtime. + string name = 1; + // Options specify additional runtime initialization options. + google.protobuf.Any options = 2; + } + // Runtime specifies which runtime to use for executing this container. + Runtime runtime = 4; + + // Spec to be used when creating the container. This is runtime specific. + google.protobuf.Any spec = 5; + + // Snapshotter specifies the snapshotter name used for rootfs + string snapshotter = 6; + + // SnapshotKey specifies the snapshot key to use for the container's root + // filesystem. When starting a task from this container, a caller should + // look up the mounts from the snapshot service and include those on the + // task create request. + // + // Snapshots referenced in this field will not be garbage collected. + // + // This field is set to empty when the rootfs is not a snapshot. + // + // This field may be updated. + string snapshot_key = 7; + + // CreatedAt is the time the container was first created. + google.protobuf.Timestamp created_at = 8; + + // UpdatedAt is the last time the container was mutated. + google.protobuf.Timestamp updated_at = 9; + + // Extensions allow clients to provide zero or more blobs that are directly + // associated with the container. One may provide protobuf, json, or other + // encoding formats. The primary use of this is to further decorate the + // container object with fields that may be specific to a client integration. + // + // The key portion of this map should identify a "name" for the extension + // that should be unique against other extensions. When updating extension + // data, one should only update the specified extension using field paths + // to select a specific map key. + map extensions = 10; + + // Sandbox ID this container belongs to. + string sandbox = 11; } message GetContainerRequest { - string id = 1; + string id = 1; } message GetContainerResponse { - Container container = 1; + Container container = 1; } message ListContainersRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, containers that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, containers that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListContainersResponse { - repeated Container containers = 1; + repeated Container containers = 1; } message CreateContainerRequest { - Container container = 1; + Container container = 1; } message CreateContainerResponse { - Container container = 1; + Container container = 1; } // UpdateContainerRequest updates the metadata on one or more container. @@ -158,24 +158,24 @@ message CreateContainerResponse { // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateContainerRequest { - // Container provides the target values, as declared by the mask, for the update. - // - // The ID field must be set. - Container container = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - google.protobuf.FieldMask update_mask = 2; + // Container provides the target values, as declared by the mask, for the update. + // + // The ID field must be set. + Container container = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + google.protobuf.FieldMask update_mask = 2; } message UpdateContainerResponse { - Container container = 1; + Container container = 1; } message DeleteContainerRequest { - string id = 1; + string id = 1; } message ListContainerMessage { - Container container = 1; + Container container = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto b/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto index 8aea0636b84f1..7e11305bbdd72 100644 --- a/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto +++ b/vendor/github.com/containerd/containerd/api/services/content/v1/content.proto @@ -1,330 +1,329 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.content.v1; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/content/v1;content"; // Content provides access to a content addressable storage system. service Content { - // Info returns information about a committed object. - // - // This call can be used for getting the size of content and checking for - // existence. - rpc Info(InfoRequest) returns (InfoResponse); - - // Update updates content metadata. - // - // This call can be used to manage the mutable content labels. The - // immutable metadata such as digest, size, and committed at cannot - // be updated. - rpc Update(UpdateRequest) returns (UpdateResponse); - - // List streams the entire set of content as Info objects and closes the - // stream. - // - // Typically, this will yield a large response, chunked into messages. - // Clients should make provisions to ensure they can handle the entire data - // set. - rpc List(ListContentRequest) returns (stream ListContentResponse); - - // Delete will delete the referenced object. - rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty); - - // Read allows one to read an object based on the offset into the content. - // - // The requested data may be returned in one or more messages. - rpc Read(ReadContentRequest) returns (stream ReadContentResponse); - - // Status returns the status for a single reference. - rpc Status(StatusRequest) returns (StatusResponse); - - // ListStatuses returns the status of ongoing object ingestions, started via - // Write. - // - // Only those matching the regular expression will be provided in the - // response. If the provided regular expression is empty, all ingestions - // will be provided. - rpc ListStatuses(ListStatusesRequest) returns (ListStatusesResponse); - - // Write begins or resumes writes to a resource identified by a unique ref. - // Only one active stream may exist at a time for each ref. - // - // Once a write stream has started, it may only write to a single ref, thus - // once a stream is started, the ref may be omitted on subsequent writes. - // - // For any write transaction represented by a ref, only a single write may - // be made to a given offset. If overlapping writes occur, it is an error. - // Writes should be sequential and implementations may throw an error if - // this is required. - // - // If expected_digest is set and already part of the content store, the - // write will fail. - // - // When completed, the commit flag should be set to true. If expected size - // or digest is set, the content will be validated against those values. - rpc Write(stream WriteContentRequest) returns (stream WriteContentResponse); - - // Abort cancels the ongoing write named in the request. Any resources - // associated with the write will be collected. - rpc Abort(AbortRequest) returns (google.protobuf.Empty); + // Info returns information about a committed object. + // + // This call can be used for getting the size of content and checking for + // existence. + rpc Info(InfoRequest) returns (InfoResponse); + + // Update updates content metadata. + // + // This call can be used to manage the mutable content labels. The + // immutable metadata such as digest, size, and committed at cannot + // be updated. + rpc Update(UpdateRequest) returns (UpdateResponse); + + // List streams the entire set of content as Info objects and closes the + // stream. + // + // Typically, this will yield a large response, chunked into messages. + // Clients should make provisions to ensure they can handle the entire data + // set. + rpc List(ListContentRequest) returns (stream ListContentResponse); + + // Delete will delete the referenced object. + rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty); + + // Read allows one to read an object based on the offset into the content. + // + // The requested data may be returned in one or more messages. + rpc Read(ReadContentRequest) returns (stream ReadContentResponse); + + // Status returns the status for a single reference. + rpc Status(StatusRequest) returns (StatusResponse); + + // ListStatuses returns the status of ongoing object ingestions, started via + // Write. + // + // Only those matching the regular expression will be provided in the + // response. If the provided regular expression is empty, all ingestions + // will be provided. + rpc ListStatuses(ListStatusesRequest) returns (ListStatusesResponse); + + // Write begins or resumes writes to a resource identified by a unique ref. + // Only one active stream may exist at a time for each ref. + // + // Once a write stream has started, it may only write to a single ref, thus + // once a stream is started, the ref may be omitted on subsequent writes. + // + // For any write transaction represented by a ref, only a single write may + // be made to a given offset. If overlapping writes occur, it is an error. + // Writes should be sequential and implementations may throw an error if + // this is required. + // + // If expected_digest is set and already part of the content store, the + // write will fail. + // + // When completed, the commit flag should be set to true. If expected size + // or digest is set, the content will be validated against those values. + rpc Write(stream WriteContentRequest) returns (stream WriteContentResponse); + + // Abort cancels the ongoing write named in the request. Any resources + // associated with the write will be collected. + rpc Abort(AbortRequest) returns (google.protobuf.Empty); } message Info { - // Digest is the hash identity of the blob. - string digest = 1; + // Digest is the hash identity of the blob. + string digest = 1; - // Size is the total number of bytes in the blob. - int64 size = 2; + // Size is the total number of bytes in the blob. + int64 size = 2; - // CreatedAt provides the time at which the blob was committed. - google.protobuf.Timestamp created_at = 3; + // CreatedAt provides the time at which the blob was committed. + google.protobuf.Timestamp created_at = 3; - // UpdatedAt provides the time the info was last updated. - google.protobuf.Timestamp updated_at = 4; + // UpdatedAt provides the time the info was last updated. + google.protobuf.Timestamp updated_at = 4; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 5; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 5; } message InfoRequest { - string digest = 1; + string digest = 1; } message InfoResponse { - Info info = 1; + Info info = 1; } message UpdateRequest { - Info info = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // In info, Digest, Size, and CreatedAt are immutable, - // other field may be updated using this mask. - // If no mask is provided, all mutable field are updated. - google.protobuf.FieldMask update_mask = 2; + Info info = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // In info, Digest, Size, and CreatedAt are immutable, + // other field may be updated using this mask. + // If no mask is provided, all mutable field are updated. + google.protobuf.FieldMask update_mask = 2; } message UpdateResponse { - Info info = 1; + Info info = 1; } message ListContentRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, containers that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, containers that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListContentResponse { - repeated Info info = 1; + repeated Info info = 1; } message DeleteContentRequest { - // Digest specifies which content to delete. - string digest = 1; + // Digest specifies which content to delete. + string digest = 1; } // ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. message ReadContentRequest { - // Digest is the hash identity to read. - string digest = 1; + // Digest is the hash identity to read. + string digest = 1; - // Offset specifies the number of bytes from the start at which to begin - // the read. If zero or less, the read will be from the start. This uses - // standard zero-indexed semantics. - int64 offset = 2; + // Offset specifies the number of bytes from the start at which to begin + // the read. If zero or less, the read will be from the start. This uses + // standard zero-indexed semantics. + int64 offset = 2; - // size is the total size of the read. If zero, the entire blob will be - // returned by the service. - int64 size = 3; + // size is the total size of the read. If zero, the entire blob will be + // returned by the service. + int64 size = 3; } // ReadContentResponse carries byte data for a read request. message ReadContentResponse { - int64 offset = 1; // offset of the returned data - bytes data = 2; // actual data + int64 offset = 1; // offset of the returned data + bytes data = 2; // actual data } message Status { - google.protobuf.Timestamp started_at = 1; - google.protobuf.Timestamp updated_at = 2; - string ref = 3; - int64 offset = 4; - int64 total = 5; - string expected = 6; + google.protobuf.Timestamp started_at = 1; + google.protobuf.Timestamp updated_at = 2; + string ref = 3; + int64 offset = 4; + int64 total = 5; + string expected = 6; } - message StatusRequest { - string ref = 1; + string ref = 1; } message StatusResponse { - Status status = 1; + Status status = 1; } message ListStatusesRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListStatusesResponse { - repeated Status statuses = 1; + repeated Status statuses = 1; } // WriteAction defines the behavior of a WriteRequest. enum WriteAction { - // WriteActionStat instructs the writer to return the current status while - // holding the lock on the write. - STAT = 0; - - // WriteActionWrite sets the action for the write request to write data. - // - // Any data included will be written at the provided offset. The - // transaction will be left open for further writes. - // - // This is the default. - WRITE = 1; - - // WriteActionCommit will write any outstanding data in the message and - // commit the write, storing it under the digest. - // - // This can be used in a single message to send the data, verify it and - // commit it. - // - // This action will always terminate the write. - COMMIT = 2; + // WriteActionStat instructs the writer to return the current status while + // holding the lock on the write. + STAT = 0; + + // WriteActionWrite sets the action for the write request to write data. + // + // Any data included will be written at the provided offset. The + // transaction will be left open for further writes. + // + // This is the default. + WRITE = 1; + + // WriteActionCommit will write any outstanding data in the message and + // commit the write, storing it under the digest. + // + // This can be used in a single message to send the data, verify it and + // commit it. + // + // This action will always terminate the write. + COMMIT = 2; } // WriteContentRequest writes data to the request ref at offset. message WriteContentRequest { - // Action sets the behavior of the write. - // - // When this is a write and the ref is not yet allocated, the ref will be - // allocated and the data will be written at offset. - // - // If the action is write and the ref is allocated, it will accept data to - // an offset that has not yet been written. - // - // If the action is write and there is no data, the current write status - // will be returned. This works differently from status because the stream - // holds a lock. - WriteAction action = 1; - - // Ref identifies the pre-commit object to write to. - string ref = 2; - - // Total can be set to have the service validate the total size of the - // committed content. - // - // The latest value before or with the commit action message will be use to - // validate the content. If the offset overflows total, the service may - // report an error. It is only required on one message for the write. - // - // If the value is zero or less, no validation of the final content will be - // performed. - int64 total = 3; - - // Expected can be set to have the service validate the final content against - // the provided digest. - // - // If the digest is already present in the object store, an AlreadyExists - // error will be returned. - // - // Only the latest version will be used to check the content against the - // digest. It is only required to include it on a single message, before or - // with the commit action message. - string expected = 4; - - // Offset specifies the number of bytes from the start at which to begin - // the write. For most implementations, this means from the start of the - // file. This uses standard, zero-indexed semantics. - // - // If the action is write, the remote may remove all previously written - // data after the offset. Implementations may support arbitrary offsets but - // MUST support reseting this value to zero with a write. If an - // implementation does not support a write at a particular offset, an - // OutOfRange error must be returned. - int64 offset = 5; - - // Data is the actual bytes to be written. - // - // If this is empty and the message is not a commit, a response will be - // returned with the current write state. - bytes data = 6; - - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 7; + // Action sets the behavior of the write. + // + // When this is a write and the ref is not yet allocated, the ref will be + // allocated and the data will be written at offset. + // + // If the action is write and the ref is allocated, it will accept data to + // an offset that has not yet been written. + // + // If the action is write and there is no data, the current write status + // will be returned. This works differently from status because the stream + // holds a lock. + WriteAction action = 1; + + // Ref identifies the pre-commit object to write to. + string ref = 2; + + // Total can be set to have the service validate the total size of the + // committed content. + // + // The latest value before or with the commit action message will be use to + // validate the content. If the offset overflows total, the service may + // report an error. It is only required on one message for the write. + // + // If the value is zero or less, no validation of the final content will be + // performed. + int64 total = 3; + + // Expected can be set to have the service validate the final content against + // the provided digest. + // + // If the digest is already present in the object store, an AlreadyExists + // error will be returned. + // + // Only the latest version will be used to check the content against the + // digest. It is only required to include it on a single message, before or + // with the commit action message. + string expected = 4; + + // Offset specifies the number of bytes from the start at which to begin + // the write. For most implementations, this means from the start of the + // file. This uses standard, zero-indexed semantics. + // + // If the action is write, the remote may remove all previously written + // data after the offset. Implementations may support arbitrary offsets but + // MUST support reseting this value to zero with a write. If an + // implementation does not support a write at a particular offset, an + // OutOfRange error must be returned. + int64 offset = 5; + + // Data is the actual bytes to be written. + // + // If this is empty and the message is not a commit, a response will be + // returned with the current write state. + bytes data = 6; + + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 7; } // WriteContentResponse is returned on the culmination of a write call. message WriteContentResponse { - // Action contains the action for the final message of the stream. A writer - // should confirm that they match the intended result. - WriteAction action = 1; - - // StartedAt provides the time at which the write began. - // - // This must be set for stat and commit write actions. All other write - // actions may omit this. - google.protobuf.Timestamp started_at = 2; - - // UpdatedAt provides the last time of a successful write. - // - // This must be set for stat and commit write actions. All other write - // actions may omit this. - google.protobuf.Timestamp updated_at = 3; - - // Offset is the current committed size for the write. - int64 offset = 4; - - // Total provides the current, expected total size of the write. - // - // We include this to provide consistency with the Status structure on the - // client writer. - // - // This is only valid on the Stat and Commit response. - int64 total = 5; - - // Digest, if present, includes the digest up to the currently committed - // bytes. If action is commit, this field will be set. It is implementation - // defined if this is set for other actions. - string digest = 6; + // Action contains the action for the final message of the stream. A writer + // should confirm that they match the intended result. + WriteAction action = 1; + + // StartedAt provides the time at which the write began. + // + // This must be set for stat and commit write actions. All other write + // actions may omit this. + google.protobuf.Timestamp started_at = 2; + + // UpdatedAt provides the last time of a successful write. + // + // This must be set for stat and commit write actions. All other write + // actions may omit this. + google.protobuf.Timestamp updated_at = 3; + + // Offset is the current committed size for the write. + int64 offset = 4; + + // Total provides the current, expected total size of the write. + // + // We include this to provide consistency with the Status structure on the + // client writer. + // + // This is only valid on the Stat and Commit response. + int64 total = 5; + + // Digest, if present, includes the digest up to the currently committed + // bytes. If action is commit, this field will be set. It is implementation + // defined if this is set for other actions. + string digest = 6; } message AbortRequest { - string ref = 1; + string ref = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto b/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto index 504d1028ea180..53c6aa2b2fbd5 100644 --- a/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto +++ b/vendor/github.com/containerd/containerd/api/services/diff/v1/diff.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -20,71 +20,71 @@ package containerd.services.diff.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; -import "types/mount.proto"; import "types/descriptor.proto"; +import "types/mount.proto"; option go_package = "github.com/containerd/containerd/api/services/diff/v1;diff"; // Diff service creates and applies diffs service Diff { - // Apply applies the content associated with the provided digests onto - // the provided mounts. Archive content will be extracted and - // decompressed if necessary. - rpc Apply(ApplyRequest) returns (ApplyResponse); - - // Diff creates a diff between the given mounts and uploads the result - // to the content store. - rpc Diff(DiffRequest) returns (DiffResponse); + // Apply applies the content associated with the provided digests onto + // the provided mounts. Archive content will be extracted and + // decompressed if necessary. + rpc Apply(ApplyRequest) returns (ApplyResponse); + + // Diff creates a diff between the given mounts and uploads the result + // to the content store. + rpc Diff(DiffRequest) returns (DiffResponse); } message ApplyRequest { - // Diff is the descriptor of the diff to be extracted - containerd.types.Descriptor diff = 1; + // Diff is the descriptor of the diff to be extracted + containerd.types.Descriptor diff = 1; - repeated containerd.types.Mount mounts = 2; + repeated containerd.types.Mount mounts = 2; - map payloads = 3; - // SyncFs is to synchronize the underlying filesystem containing files. - bool sync_fs = 4; + map payloads = 3; + // SyncFs is to synchronize the underlying filesystem containing files. + bool sync_fs = 4; } message ApplyResponse { - // Applied is the descriptor for the object which was applied. - // If the input was a compressed blob then the result will be - // the descriptor for the uncompressed blob. - containerd.types.Descriptor applied = 1; + // Applied is the descriptor for the object which was applied. + // If the input was a compressed blob then the result will be + // the descriptor for the uncompressed blob. + containerd.types.Descriptor applied = 1; } message DiffRequest { - // Left are the mounts which represent the older copy - // in which is the base of the computed changes. - repeated containerd.types.Mount left = 1; - - // Right are the mounts which represents the newer copy - // in which changes from the left were made into. - repeated containerd.types.Mount right = 2; - - // MediaType is the media type descriptor for the created diff - // object - string media_type = 3; - - // Ref identifies the pre-commit content store object. This - // reference can be used to get the status from the content store. - string ref = 4; - - // Labels are the labels to apply to the generated content - // on content store commit. - map labels = 5; - - // SourceDateEpoch specifies the timestamp used to provide control for reproducibility. - // See also https://reproducible-builds.org/docs/source-date-epoch/ . - // - // Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01), - // not to the source date epoch. - google.protobuf.Timestamp source_date_epoch = 6; + // Left are the mounts which represent the older copy + // in which is the base of the computed changes. + repeated containerd.types.Mount left = 1; + + // Right are the mounts which represents the newer copy + // in which changes from the left were made into. + repeated containerd.types.Mount right = 2; + + // MediaType is the media type descriptor for the created diff + // object + string media_type = 3; + + // Ref identifies the pre-commit content store object. This + // reference can be used to get the status from the content store. + string ref = 4; + + // Labels are the labels to apply to the generated content + // on content store commit. + map labels = 5; + + // SourceDateEpoch specifies the timestamp used to provide control for reproducibility. + // See also https://reproducible-builds.org/docs/source-date-epoch/ . + // + // Since containerd v2.0, the whiteout timestamps are set to zero (1970-01-01), + // not to the source date epoch. + google.protobuf.Timestamp source_date_epoch = 6; } message DiffResponse { - // Diff is the descriptor of the diff which can be applied - containerd.types.Descriptor diff = 3; + // Diff is the descriptor of the diff which can be applied + containerd.types.Descriptor diff = 3; } diff --git a/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto b/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto index 1d39bbe4be3a6..a87da21c4f0d2 100644 --- a/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto +++ b/vendor/github.com/containerd/containerd/api/services/events/v1/events.proto @@ -1,62 +1,62 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.events.v1; -import "types/event.proto"; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; +import "types/event.proto"; option go_package = "github.com/containerd/containerd/api/services/events/v1;events"; service Events { - // Publish an event to a topic. - // - // The event will be packed into a timestamp envelope with the namespace - // introspected from the context. The envelope will then be dispatched. - rpc Publish(PublishRequest) returns (google.protobuf.Empty); - - // Forward sends an event that has already been packaged into an envelope - // with a timestamp and namespace. - // - // This is useful if earlier timestamping is required or when forwarding on - // behalf of another component, namespace or publisher. - rpc Forward(ForwardRequest) returns (google.protobuf.Empty); - - // Subscribe to a stream of events, possibly returning only that match any - // of the provided filters. - // - // Unlike many other methods in containerd, subscribers will get messages - // from all namespaces unless otherwise specified. If this is not desired, - // a filter can be provided in the format 'namespace==' to - // restrict the received events. - rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope); + // Publish an event to a topic. + // + // The event will be packed into a timestamp envelope with the namespace + // introspected from the context. The envelope will then be dispatched. + rpc Publish(PublishRequest) returns (google.protobuf.Empty); + + // Forward sends an event that has already been packaged into an envelope + // with a timestamp and namespace. + // + // This is useful if earlier timestamping is required or when forwarding on + // behalf of another component, namespace or publisher. + rpc Forward(ForwardRequest) returns (google.protobuf.Empty); + + // Subscribe to a stream of events, possibly returning only that match any + // of the provided filters. + // + // Unlike many other methods in containerd, subscribers will get messages + // from all namespaces unless otherwise specified. If this is not desired, + // a filter can be provided in the format 'namespace==' to + // restrict the received events. + rpc Subscribe(SubscribeRequest) returns (stream containerd.types.Envelope); } message PublishRequest { - string topic = 1; - google.protobuf.Any event = 2; + string topic = 1; + google.protobuf.Any event = 2; } message ForwardRequest { - containerd.types.Envelope envelope = 1; + containerd.types.Envelope envelope = 1; } message SubscribeRequest { - repeated string filters = 1; + repeated string filters = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto b/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto index b09514b9713fb..19d19207a8c2e 100644 --- a/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto +++ b/vendor/github.com/containerd/containerd/api/services/images/v1/images.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -37,113 +37,113 @@ option go_package = "github.com/containerd/containerd/api/services/images/v1;ima // // As such, this can really be considered a "metadata service". service Images { - // Get returns an image by name. - rpc Get(GetImageRequest) returns (GetImageResponse); + // Get returns an image by name. + rpc Get(GetImageRequest) returns (GetImageResponse); - // List returns a list of all images known to containerd. - rpc List(ListImagesRequest) returns (ListImagesResponse); + // List returns a list of all images known to containerd. + rpc List(ListImagesRequest) returns (ListImagesResponse); - // Create an image record in the metadata store. - // - // The name of the image must be unique. - rpc Create(CreateImageRequest) returns (CreateImageResponse); + // Create an image record in the metadata store. + // + // The name of the image must be unique. + rpc Create(CreateImageRequest) returns (CreateImageResponse); - // Update assigns the name to a given target image based on the provided - // image. - rpc Update(UpdateImageRequest) returns (UpdateImageResponse); + // Update assigns the name to a given target image based on the provided + // image. + rpc Update(UpdateImageRequest) returns (UpdateImageResponse); - // Delete deletes the image by name. - rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); + // Delete deletes the image by name. + rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); } message Image { - // Name provides a unique name for the image. - // - // Containerd treats this as the primary identifier. - string name = 1; - - // Labels provides free form labels for the image. These are runtime only - // and do not get inherited into the package image in any way. - // - // Labels may be updated using the field mask. - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 2; - - // Target describes the content entry point of the image. - containerd.types.Descriptor target = 3; - - // CreatedAt is the time the image was first created. - google.protobuf.Timestamp created_at = 7; - - // UpdatedAt is the last time the image was mutated. - google.protobuf.Timestamp updated_at = 8; + // Name provides a unique name for the image. + // + // Containerd treats this as the primary identifier. + string name = 1; + + // Labels provides free form labels for the image. These are runtime only + // and do not get inherited into the package image in any way. + // + // Labels may be updated using the field mask. + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 2; + + // Target describes the content entry point of the image. + containerd.types.Descriptor target = 3; + + // CreatedAt is the time the image was first created. + google.protobuf.Timestamp created_at = 7; + + // UpdatedAt is the last time the image was mutated. + google.protobuf.Timestamp updated_at = 8; } message GetImageRequest { - string name = 1; + string name = 1; } message GetImageResponse { - Image image = 1; + Image image = 1; } message CreateImageRequest { - Image image = 1; + Image image = 1; - google.protobuf.Timestamp source_date_epoch = 2; + google.protobuf.Timestamp source_date_epoch = 2; } message CreateImageResponse { - Image image = 1; + Image image = 1; } message UpdateImageRequest { - // Image provides a full or partial image for update. - // - // The name field must be set or an error will be returned. - Image image = 1; + // Image provides a full or partial image for update. + // + // The name field must be set or an error will be returned. + Image image = 1; - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - google.protobuf.FieldMask update_mask = 2; + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + google.protobuf.FieldMask update_mask = 2; - google.protobuf.Timestamp source_date_epoch = 3; + google.protobuf.Timestamp source_date_epoch = 3; } message UpdateImageResponse { - Image image = 1; + Image image = 1; } message ListImagesRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, images that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message ListImagesResponse { - repeated Image images = 1; + repeated Image images = 1; } message DeleteImageRequest { - string name = 1; - - // Sync indicates that the delete and cleanup should be done - // synchronously before returning to the caller - // - // Default is false - bool sync = 2; - - // Target value for image to be deleted - // - // If image descriptor does not match the same digest, - // the delete operation will return "not found" error. - optional containerd.types.Descriptor target = 3; + string name = 1; + + // Sync indicates that the delete and cleanup should be done + // synchronously before returning to the caller + // + // Default is false + bool sync = 2; + + // Target value for image to be deleted + // + // If image descriptor does not match the same digest, + // the delete operation will return "not found" error. + optional containerd.types.Descriptor target = 3; } diff --git a/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto b/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto index e8d25e00c8906..a012ac8281ef4 100644 --- a/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto +++ b/vendor/github.com/containerd/containerd/api/services/introspection/v1/introspection.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -19,115 +19,115 @@ syntax = "proto3"; package containerd.services.introspection.v1; import "google/protobuf/any.proto"; -import "types/introspection.proto"; -import "types/platform.proto"; -import "google/rpc/status.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "types/introspection.proto"; +import "types/platform.proto"; option go_package = "github.com/containerd/containerd/api/services/introspection/v1;introspection"; service Introspection { - // Plugins returns a list of plugins in containerd. - // - // Clients can use this to detect features and capabilities when using - // containerd. - rpc Plugins(PluginsRequest) returns (PluginsResponse); - // Server returns information about the containerd server - rpc Server(google.protobuf.Empty) returns (ServerResponse); - // PluginInfo returns information directly from a plugin if the plugin supports it - rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse); + // Plugins returns a list of plugins in containerd. + // + // Clients can use this to detect features and capabilities when using + // containerd. + rpc Plugins(PluginsRequest) returns (PluginsResponse); + // Server returns information about the containerd server + rpc Server(google.protobuf.Empty) returns (ServerResponse); + // PluginInfo returns information directly from a plugin if the plugin supports it + rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse); } message Plugin { - // Type defines the type of plugin. - // - // See package plugin for a list of possible values. Non core plugins may - // define their own values during registration. - string type = 1; - - // ID identifies the plugin uniquely in the system. - string id = 2; - - // Requires lists the plugin types required by this plugin. - repeated string requires = 3; - - // Platforms enumerates the platforms this plugin will support. - // - // If values are provided here, the plugin will only be operable under the - // provided platforms. - // - // If this is empty, the plugin will work across all platforms. - // - // If the plugin prefers certain platforms over others, they should be - // listed from most to least preferred. - repeated types.Platform platforms = 4; - - // Exports allows plugins to provide values about state or configuration to - // interested parties. - // - // One example is exposing the configured path of a snapshotter plugin. - map exports = 5; - - // Capabilities allows plugins to communicate feature switches to allow - // clients to detect features that may not be on be default or may be - // different from version to version. - // - // Use this sparingly. - repeated string capabilities = 6; - - // InitErr will be set if the plugin fails initialization. - // - // This means the plugin may have been registered but a non-terminal error - // was encountered during initialization. - // - // Plugins that have this value set cannot be used. - google.rpc.Status init_err = 7; + // Type defines the type of plugin. + // + // See package plugin for a list of possible values. Non core plugins may + // define their own values during registration. + string type = 1; + + // ID identifies the plugin uniquely in the system. + string id = 2; + + // Requires lists the plugin types required by this plugin. + repeated string requires = 3; + + // Platforms enumerates the platforms this plugin will support. + // + // If values are provided here, the plugin will only be operable under the + // provided platforms. + // + // If this is empty, the plugin will work across all platforms. + // + // If the plugin prefers certain platforms over others, they should be + // listed from most to least preferred. + repeated types.Platform platforms = 4; + + // Exports allows plugins to provide values about state or configuration to + // interested parties. + // + // One example is exposing the configured path of a snapshotter plugin. + map exports = 5; + + // Capabilities allows plugins to communicate feature switches to allow + // clients to detect features that may not be on be default or may be + // different from version to version. + // + // Use this sparingly. + repeated string capabilities = 6; + + // InitErr will be set if the plugin fails initialization. + // + // This means the plugin may have been registered but a non-terminal error + // was encountered during initialization. + // + // Plugins that have this value set cannot be used. + google.rpc.Status init_err = 7; } message PluginsRequest { - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, plugins that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 1; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, plugins that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 1; } message PluginsResponse { - repeated Plugin plugins = 1; + repeated Plugin plugins = 1; } message ServerResponse { - string uuid = 1; - uint64 pid = 2; - uint64 pidns = 3; // PID namespace, such as 4026531836 - repeated DeprecationWarning deprecations = 4; + string uuid = 1; + uint64 pid = 2; + uint64 pidns = 3; // PID namespace, such as 4026531836 + repeated DeprecationWarning deprecations = 4; } message DeprecationWarning { - string id = 1; - string message = 2; - google.protobuf.Timestamp last_occurrence = 3; + string id = 1; + string message = 2; + google.protobuf.Timestamp last_occurrence = 3; } message PluginInfoRequest { - string type = 1; - string id = 2; - - // Options may be used to request extra dynamic information from - // a plugin. - // This object is determined by the plugin and the plugin may return - // NotImplemented or InvalidArgument if it is not supported - google.protobuf.Any options = 3; + string type = 1; + string id = 2; + + // Options may be used to request extra dynamic information from + // a plugin. + // This object is determined by the plugin and the plugin may return + // NotImplemented or InvalidArgument if it is not supported + google.protobuf.Any options = 3; } message PluginInfoResponse { - Plugin plugin = 1; - google.protobuf.Any extra = 2; + Plugin plugin = 1; + google.protobuf.Any extra = 2; } diff --git a/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto b/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto index 8551fcea7f64f..acfdbf3c44b65 100644 --- a/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto +++ b/vendor/github.com/containerd/containerd/api/services/leases/v1/leases.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,93 +24,93 @@ option go_package = "github.com/containerd/containerd/api/services/leases/v1;lea // Leases service manages resources leases within the metadata store. service Leases { - // Create creates a new lease for managing changes to metadata. A lease - // can be used to protect objects from being removed. - rpc Create(CreateRequest) returns (CreateResponse); + // Create creates a new lease for managing changes to metadata. A lease + // can be used to protect objects from being removed. + rpc Create(CreateRequest) returns (CreateResponse); - // Delete deletes the lease and makes any unreferenced objects created - // during the lease eligible for garbage collection if not referenced - // or retained by other resources during the lease. - rpc Delete(DeleteRequest) returns (google.protobuf.Empty); + // Delete deletes the lease and makes any unreferenced objects created + // during the lease eligible for garbage collection if not referenced + // or retained by other resources during the lease. + rpc Delete(DeleteRequest) returns (google.protobuf.Empty); - // List lists all active leases, returning the full list of - // leases and optionally including the referenced resources. - rpc List(ListRequest) returns (ListResponse); + // List lists all active leases, returning the full list of + // leases and optionally including the referenced resources. + rpc List(ListRequest) returns (ListResponse); - // AddResource references the resource by the provided lease. - rpc AddResource(AddResourceRequest) returns (google.protobuf.Empty); + // AddResource references the resource by the provided lease. + rpc AddResource(AddResourceRequest) returns (google.protobuf.Empty); - // DeleteResource dereferences the resource by the provided lease. - rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty); + // DeleteResource dereferences the resource by the provided lease. + rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty); - // ListResources lists all the resources referenced by the lease. - rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse); + // ListResources lists all the resources referenced by the lease. + rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse); } // Lease is an object which retains resources while it exists. message Lease { - string id = 1; + string id = 1; - google.protobuf.Timestamp created_at = 2; + google.protobuf.Timestamp created_at = 2; - map labels = 3; + map labels = 3; } message CreateRequest { - // ID is used to identity the lease, when the id is not set the service - // generates a random identifier for the lease. - string id = 1; + // ID is used to identity the lease, when the id is not set the service + // generates a random identifier for the lease. + string id = 1; - map labels = 3; + map labels = 3; } message CreateResponse { - Lease lease = 1; + Lease lease = 1; } message DeleteRequest { - string id = 1; + string id = 1; - // Sync indicates that the delete and cleanup should be done - // synchronously before returning to the caller - // - // Default is false - bool sync = 2; + // Sync indicates that the delete and cleanup should be done + // synchronously before returning to the caller + // + // Default is false + bool sync = 2; } message ListRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListResponse { - repeated Lease leases = 1; + repeated Lease leases = 1; } message Resource { - string id = 1; + string id = 1; - // For snapshotter resource, there are many snapshotter types here, like - // overlayfs, devmapper etc. The type will be formatted with type, - // like "snapshotter/overlayfs". - string type = 2; + // For snapshotter resource, there are many snapshotter types here, like + // overlayfs, devmapper etc. The type will be formatted with type, + // like "snapshotter/overlayfs". + string type = 2; } message AddResourceRequest { - string id = 1; + string id = 1; - Resource resource = 2; + Resource resource = 2; } message DeleteResourceRequest { - string id = 1; + string id = 1; - Resource resource = 2; + Resource resource = 2; } message ListResourcesRequest { - string id = 1; + string id = 1; } message ListResourcesResponse { - repeated Resource resources = 1 ; + repeated Resource resources = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto b/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto index 11ba1a4c42288..d731a91d073c8 100644 --- a/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto +++ b/vendor/github.com/containerd/containerd/api/services/mounts/v1/mounts.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -25,54 +25,53 @@ option go_package = "github.com/containerd/containerd/api/services/mounts/v1;mou // Mounts service manages mounts service Mounts { - rpc Activate(ActivateRequest) returns (ActivateResponse); - rpc Deactivate(DeactivateRequest) returns (google.protobuf.Empty); - rpc Info(InfoRequest) returns (InfoResponse); - rpc Update(UpdateRequest) returns (UpdateResponse); - rpc List(ListRequest) returns (stream ListMessage); + rpc Activate(ActivateRequest) returns (ActivateResponse); + rpc Deactivate(DeactivateRequest) returns (google.protobuf.Empty); + rpc Info(InfoRequest) returns (InfoResponse); + rpc Update(UpdateRequest) returns (UpdateResponse); + rpc List(ListRequest) returns (stream ListMessage); } message ActivateRequest { - string name = 1; + string name = 1; - repeated containerd.types.Mount mounts = 2; + repeated containerd.types.Mount mounts = 2; - map labels = 3; - - bool temporary = 4; + map labels = 3; + bool temporary = 4; } message ActivateResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message DeactivateRequest { - string name = 1; + string name = 1; } message InfoRequest { - string name = 1; + string name = 1; } message InfoResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message UpdateRequest { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; - google.protobuf.FieldMask update_mask = 2; + google.protobuf.FieldMask update_mask = 2; } message UpdateResponse { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } message ListRequest { - repeated string filters = 1; + repeated string filters = 1; } message ListMessage { - containerd.types.ActivationInfo info = 1; + containerd.types.ActivationInfo info = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto b/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto index 910bcd6c72088..f534875dc6360 100644 --- a/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto +++ b/vendor/github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -35,47 +35,47 @@ option go_package = "github.com/containerd/containerd/api/services/namespaces/v1 // I hope this goes without saying, but namespaces are themselves NOT // namespaced. service Namespaces { - rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); - rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); - rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); - rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); - rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); + rpc Get(GetNamespaceRequest) returns (GetNamespaceResponse); + rpc List(ListNamespacesRequest) returns (ListNamespacesResponse); + rpc Create(CreateNamespaceRequest) returns (CreateNamespaceResponse); + rpc Update(UpdateNamespaceRequest) returns (UpdateNamespaceResponse); + rpc Delete(DeleteNamespaceRequest) returns (google.protobuf.Empty); } message Namespace { - string name = 1; - - // Labels provides an area to include arbitrary data on namespaces. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - // - // Note that to add a new value to this field, read the existing set and - // include the entire result in the update call. - map labels = 2; + string name = 1; + + // Labels provides an area to include arbitrary data on namespaces. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + // + // Note that to add a new value to this field, read the existing set and + // include the entire result in the update call. + map labels = 2; } message GetNamespaceRequest { - string name = 1; + string name = 1; } message GetNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } message ListNamespacesRequest { - string filter = 1; + string filter = 1; } message ListNamespacesResponse { - repeated Namespace namespaces = 1; + repeated Namespace namespaces = 1; } message CreateNamespaceRequest { - Namespace namespace = 1; + Namespace namespace = 1; } message CreateNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } // UpdateNamespaceRequest updates the metadata for a namespace. @@ -84,24 +84,24 @@ message CreateNamespaceResponse { // https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask, // unless otherwise qualified. message UpdateNamespaceRequest { - // Namespace provides the target value, as declared by the mask, for the update. - // - // The namespace field must be set. - Namespace namespace = 1; - - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // For the most part, this applies only to selectively updating labels on - // the namespace. While field masks are typically limited to ascii alphas - // and digits, we just take everything after the "labels." as the map key. - google.protobuf.FieldMask update_mask = 2; + // Namespace provides the target value, as declared by the mask, for the update. + // + // The namespace field must be set. + Namespace namespace = 1; + + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // For the most part, this applies only to selectively updating labels on + // the namespace. While field masks are typically limited to ascii alphas + // and digits, we just take everything after the "labels." as the map key. + google.protobuf.FieldMask update_mask = 2; } message UpdateNamespaceResponse { - Namespace namespace = 1; + Namespace namespace = 1; } message DeleteNamespaceRequest { - string name = 1; + string name = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto b/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto index 5ee7839642c56..fcbf5053cc8e3 100644 --- a/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto +++ b/vendor/github.com/containerd/containerd/api/services/sandbox/v1/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -27,11 +27,10 @@ package containerd.services.sandbox.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; - -import "types/sandbox.proto"; +import "types/metrics.proto"; import "types/mount.proto"; import "types/platform.proto"; -import "types/metrics.proto"; +import "types/sandbox.proto"; option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sandbox"; @@ -39,166 +38,165 @@ option go_package = "github.com/containerd/containerd/api/services/sandbox/v1;sa // sandbox object includes info required to start a new instance, but no runtime state. // When running a new sandbox instance, store objects are used as base type to create from. service Store { - rpc Create(StoreCreateRequest) returns (StoreCreateResponse); - rpc Update(StoreUpdateRequest) returns (StoreUpdateResponse); - rpc Delete(StoreDeleteRequest) returns (StoreDeleteResponse); - rpc List(StoreListRequest) returns (StoreListResponse); - rpc Get(StoreGetRequest) returns (StoreGetResponse); + rpc Create(StoreCreateRequest) returns (StoreCreateResponse); + rpc Update(StoreUpdateRequest) returns (StoreUpdateResponse); + rpc Delete(StoreDeleteRequest) returns (StoreDeleteResponse); + rpc List(StoreListRequest) returns (StoreListResponse); + rpc Get(StoreGetRequest) returns (StoreGetResponse); } message StoreCreateRequest { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreCreateResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreUpdateRequest { - containerd.types.Sandbox sandbox = 1; - repeated string fields = 2; + containerd.types.Sandbox sandbox = 1; + repeated string fields = 2; } message StoreUpdateResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } message StoreDeleteRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StoreDeleteResponse {} message StoreListRequest { - repeated string filters = 1; + repeated string filters = 1; } message StoreListResponse { - repeated containerd.types.Sandbox list = 1; + repeated containerd.types.Sandbox list = 1; } message StoreGetRequest { - string sandbox_id = 1; + string sandbox_id = 1; } message StoreGetResponse { - containerd.types.Sandbox sandbox = 1; + containerd.types.Sandbox sandbox = 1; } // Controller is an interface to manage runtime sandbox instances. service Controller { - rpc Create(ControllerCreateRequest) returns (ControllerCreateResponse); - rpc Start(ControllerStartRequest) returns (ControllerStartResponse); - rpc Platform(ControllerPlatformRequest) returns (ControllerPlatformResponse); - rpc Stop(ControllerStopRequest) returns (ControllerStopResponse); - rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse); - rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse); - rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse); - rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse); - rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse); + rpc Create(ControllerCreateRequest) returns (ControllerCreateResponse); + rpc Start(ControllerStartRequest) returns (ControllerStartResponse); + rpc Platform(ControllerPlatformRequest) returns (ControllerPlatformResponse); + rpc Stop(ControllerStopRequest) returns (ControllerStopResponse); + rpc Wait(ControllerWaitRequest) returns (ControllerWaitResponse); + rpc Status(ControllerStatusRequest) returns (ControllerStatusResponse); + rpc Shutdown(ControllerShutdownRequest) returns (ControllerShutdownResponse); + rpc Metrics(ControllerMetricsRequest) returns (ControllerMetricsResponse); + rpc Update(ControllerUpdateRequest) returns (ControllerUpdateResponse); } message ControllerCreateRequest { - string sandbox_id = 1; - repeated containerd.types.Mount rootfs = 2; - google.protobuf.Any options = 3; - string netns_path = 4; - map annotations = 5; - containerd.types.Sandbox sandbox = 6; - string sandboxer = 10; + string sandbox_id = 1; + repeated containerd.types.Mount rootfs = 2; + google.protobuf.Any options = 3; + string netns_path = 4; + map annotations = 5; + containerd.types.Sandbox sandbox = 6; + string sandboxer = 10; } message ControllerCreateResponse { - string sandbox_id = 1; + string sandbox_id = 1; } message ControllerStartRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerStartResponse { - string sandbox_id = 1; - uint32 pid = 2; - google.protobuf.Timestamp created_at = 3; - map labels = 4; - // Address of the sandbox for containerd to connect, - // for calling Task or other APIs serving in the sandbox. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string address = 5; - uint32 version = 6; + string sandbox_id = 1; + uint32 pid = 2; + google.protobuf.Timestamp created_at = 3; + map labels = 4; + // Address of the sandbox for containerd to connect, + // for calling Task or other APIs serving in the sandbox. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string address = 5; + uint32 version = 6; } message ControllerPlatformRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerPlatformResponse { - containerd.types.Platform platform = 1; + containerd.types.Platform platform = 1; } message ControllerStopRequest { - string sandbox_id = 1; - uint32 timeout_secs = 2; - string sandboxer = 10; + string sandbox_id = 1; + uint32 timeout_secs = 2; + string sandboxer = 10; } message ControllerStopResponse {} message ControllerWaitRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerWaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } message ControllerStatusRequest { - string sandbox_id = 1; - bool verbose = 2; - string sandboxer = 10; + string sandbox_id = 1; + bool verbose = 2; + string sandboxer = 10; } message ControllerStatusResponse { - string sandbox_id = 1; - uint32 pid = 2; - string state = 3; - map info = 4; - google.protobuf.Timestamp created_at = 5; - google.protobuf.Timestamp exited_at = 6; - google.protobuf.Any extra = 7; - // Address of the sandbox for containerd to connect, - // for calling Task or other APIs serving in the sandbox. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string address = 8; - uint32 version = 9; + string sandbox_id = 1; + uint32 pid = 2; + string state = 3; + map info = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp exited_at = 6; + google.protobuf.Any extra = 7; + // Address of the sandbox for containerd to connect, + // for calling Task or other APIs serving in the sandbox. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string address = 8; + uint32 version = 9; } message ControllerShutdownRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerShutdownResponse {} message ControllerMetricsRequest { - string sandbox_id = 1; - string sandboxer = 10; + string sandbox_id = 1; + string sandboxer = 10; } message ControllerMetricsResponse { - types.Metric metrics = 1; + types.Metric metrics = 1; } message ControllerUpdateRequest { - string sandbox_id = 1; - string sandboxer = 2; - containerd.types.Sandbox sandbox = 3; - repeated string fields = 4; + string sandbox_id = 1; + string sandboxer = 2; + containerd.types.Sandbox sandbox = 3; + repeated string fields = 4; } -message ControllerUpdateResponse { -} +message ControllerUpdateResponse {} diff --git a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto index e63ec35b5a487..eb8a98f793c2d 100644 --- a/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto +++ b/vendor/github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -27,155 +27,155 @@ option go_package = "github.com/containerd/containerd/api/services/snapshots/v1; // Snapshot service manages snapshots service Snapshots { - rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); - rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); - rpc Mounts(MountsRequest) returns (MountsResponse); - rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); - rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); - rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); - rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); - rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); - rpc Usage(UsageRequest) returns (UsageResponse); - rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); + rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); + rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); + rpc Mounts(MountsRequest) returns (MountsResponse); + rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); + rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); + rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); + rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); + rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); + rpc Usage(UsageRequest) returns (UsageResponse); + rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); } message PrepareSnapshotRequest { - string snapshotter = 1; - string key = 2; - string parent = 3; + string snapshotter = 1; + string key = 2; + string parent = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; } message PrepareSnapshotResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message ViewSnapshotRequest { - string snapshotter = 1; - string key = 2; - string parent = 3; + string snapshotter = 1; + string key = 2; + string parent = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; } message ViewSnapshotResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message MountsRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message MountsResponse { - repeated containerd.types.Mount mounts = 1; + repeated containerd.types.Mount mounts = 1; } message RemoveSnapshotRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message CommitSnapshotRequest { - string snapshotter = 1; - string name = 2; - string key = 3; + string snapshotter = 1; + string name = 2; + string key = 3; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 4; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 4; - string parent = 5; + string parent = 5; } message StatSnapshotRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } enum Kind { - UNKNOWN = 0; - VIEW = 1; - ACTIVE = 2; - COMMITTED = 3; + UNKNOWN = 0; + VIEW = 1; + ACTIVE = 2; + COMMITTED = 3; } message Info { - string name = 1; - string parent = 2; - Kind kind = 3; + string name = 1; + string parent = 2; + Kind kind = 3; - // CreatedAt provides the time at which the snapshot was created. - google.protobuf.Timestamp created_at = 4; + // CreatedAt provides the time at which the snapshot was created. + google.protobuf.Timestamp created_at = 4; - // UpdatedAt provides the time the info was last updated. - google.protobuf.Timestamp updated_at = 5; + // UpdatedAt provides the time the info was last updated. + google.protobuf.Timestamp updated_at = 5; - // Labels are arbitrary data on snapshots. - // - // The combined size of a key/value pair cannot exceed 4096 bytes. - map labels = 6; + // Labels are arbitrary data on snapshots. + // + // The combined size of a key/value pair cannot exceed 4096 bytes. + map labels = 6; } message StatSnapshotResponse { - Info info = 1; + Info info = 1; } message UpdateSnapshotRequest { - string snapshotter = 1; - Info info = 2; + string snapshotter = 1; + Info info = 2; - // UpdateMask specifies which fields to perform the update on. If empty, - // the operation applies to all fields. - // - // In info, Name, Parent, Kind, Created are immutable, - // other field may be updated using this mask. - // If no mask is provided, all mutable field are updated. - google.protobuf.FieldMask update_mask = 3; + // UpdateMask specifies which fields to perform the update on. If empty, + // the operation applies to all fields. + // + // In info, Name, Parent, Kind, Created are immutable, + // other field may be updated using this mask. + // If no mask is provided, all mutable field are updated. + google.protobuf.FieldMask update_mask = 3; } message UpdateSnapshotResponse { - Info info = 1; + Info info = 1; } -message ListSnapshotsRequest{ - string snapshotter = 1; +message ListSnapshotsRequest { + string snapshotter = 1; - // Filters contains one or more filters using the syntax defined in the - // containerd filter package. - // - // The returned result will be those that match any of the provided - // filters. Expanded, images that match the following will be - // returned: - // - // filters[0] or filters[1] or ... or filters[n-1] or filters[n] - // - // If filters is zero-length or nil, all items will be returned. - repeated string filters = 2; + // Filters contains one or more filters using the syntax defined in the + // containerd filter package. + // + // The returned result will be those that match any of the provided + // filters. Expanded, images that match the following will be + // returned: + // + // filters[0] or filters[1] or ... or filters[n-1] or filters[n] + // + // If filters is zero-length or nil, all items will be returned. + repeated string filters = 2; } message ListSnapshotsResponse { - repeated Info info = 1; + repeated Info info = 1; } message UsageRequest { - string snapshotter = 1; - string key = 2; + string snapshotter = 1; + string key = 2; } message UsageResponse { - int64 size = 1; - int64 inodes = 2; + int64 size = 1; + int64 inodes = 2; } message CleanupRequest { - string snapshotter = 1; + string snapshotter = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto b/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto index 4c14f2ecfa095..57e1a7c019e08 100644 --- a/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto +++ b/vendor/github.com/containerd/containerd/api/services/streaming/v1/streaming.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,9 +23,9 @@ import "google/protobuf/any.proto"; option go_package = "github.com/containerd/containerd/api/services/streaming/v1;streaming"; service Streaming { - rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any); + rpc Stream(stream google.protobuf.Any) returns (stream google.protobuf.Any); } message StreamInit { - string id = 1; + string id = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto b/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto index a46ebaf429ac9..4113f45bf5fad 100644 --- a/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto +++ b/vendor/github.com/containerd/containerd/api/services/tasks/v1/tasks.proto @@ -1,227 +1,226 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.tasks.v1; -import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; -import "types/mount.proto"; -import "types/metrics.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; import "types/descriptor.proto"; +import "types/metrics.proto"; +import "types/mount.proto"; import "types/task/task.proto"; -import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/services/tasks/v1;tasks"; service Tasks { - // Create a task. - rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + // Create a task. + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); - // Start a process. - rpc Start(StartRequest) returns (StartResponse); + // Start a process. + rpc Start(StartRequest) returns (StartResponse); - // Delete a task and on disk state. - rpc Delete(DeleteTaskRequest) returns (DeleteResponse); + // Delete a task and on disk state. + rpc Delete(DeleteTaskRequest) returns (DeleteResponse); - rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); + rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); - rpc Get(GetRequest) returns (GetResponse); + rpc Get(GetRequest) returns (GetResponse); - rpc List(ListTasksRequest) returns (ListTasksResponse); + rpc List(ListTasksRequest) returns (ListTasksResponse); - // Kill a task or process. - rpc Kill(KillRequest) returns (google.protobuf.Empty); + // Kill a task or process. + rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); + rpc Exec(ExecProcessRequest) returns (google.protobuf.Empty); - rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); - rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); - rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); + rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); + rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); - rpc ListPids(ListPidsRequest) returns (ListPidsResponse); + rpc ListPids(ListPidsRequest) returns (ListPidsResponse); - rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); + rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); - rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); + rpc Update(UpdateTaskRequest) returns (google.protobuf.Empty); - rpc Metrics(MetricsRequest) returns (MetricsResponse); + rpc Metrics(MetricsRequest) returns (MetricsResponse); - rpc Wait(WaitRequest) returns (WaitResponse); + rpc Wait(WaitRequest) returns (WaitResponse); } message CreateTaskRequest { - string container_id = 1; + string container_id = 1; - // RootFS provides the pre-chroot mounts to perform in the shim before - // executing the container task. - // - // These are for mounts that cannot be performed in the user namespace. - // Typically, these mounts should be resolved from snapshots specified on - // the container object. - repeated containerd.types.Mount rootfs = 3; + // RootFS provides the pre-chroot mounts to perform in the shim before + // executing the container task. + // + // These are for mounts that cannot be performed in the user namespace. + // Typically, these mounts should be resolved from snapshots specified on + // the container object. + repeated containerd.types.Mount rootfs = 3; - string stdin = 4; - string stdout = 5; - string stderr = 6; - bool terminal = 7; + string stdin = 4; + string stdout = 5; + string stderr = 6; + bool terminal = 7; - containerd.types.Descriptor checkpoint = 8; + containerd.types.Descriptor checkpoint = 8; - google.protobuf.Any options = 9; + google.protobuf.Any options = 9; - string runtime_path = 10; + string runtime_path = 10; } message CreateTaskResponse { - string container_id = 1; - uint32 pid = 2; + string container_id = 1; + uint32 pid = 2; } message StartRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message StartResponse { - uint32 pid = 1; + uint32 pid = 1; } message DeleteTaskRequest { - string container_id = 1; + string container_id = 1; } message DeleteResponse { - string id = 1; - uint32 pid = 2; - uint32 exit_status = 3; - google.protobuf.Timestamp exited_at = 4; + string id = 1; + uint32 pid = 2; + uint32 exit_status = 3; + google.protobuf.Timestamp exited_at = 4; } message DeleteProcessRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message GetRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message GetResponse { - containerd.v1.types.Process process = 1; + containerd.v1.types.Process process = 1; } message ListTasksRequest { - string filter = 1; + string filter = 1; } message ListTasksResponse { - repeated containerd.v1.types.Process tasks = 1; + repeated containerd.v1.types.Process tasks = 1; } message KillRequest { - string container_id = 1; - string exec_id = 2; - uint32 signal = 3; - bool all = 4; + string container_id = 1; + string exec_id = 2; + uint32 signal = 3; + bool all = 4; } message ExecProcessRequest { - string container_id = 1; - string stdin = 2; - string stdout = 3; - string stderr = 4; - bool terminal = 5; - // Spec for starting a process in the target container. - // - // For runc, this is a process spec, for example. - google.protobuf.Any spec = 6; - // id of the exec process - string exec_id = 7; + string container_id = 1; + string stdin = 2; + string stdout = 3; + string stderr = 4; + bool terminal = 5; + // Spec for starting a process in the target container. + // + // For runc, this is a process spec, for example. + google.protobuf.Any spec = 6; + // id of the exec process + string exec_id = 7; } -message ExecProcessResponse { -} +message ExecProcessResponse {} message ResizePtyRequest { - string container_id = 1; - string exec_id = 2; - uint32 width = 3; - uint32 height = 4; + string container_id = 1; + string exec_id = 2; + uint32 width = 3; + uint32 height = 4; } message CloseIORequest { - string container_id = 1; - string exec_id = 2; - bool stdin = 3; + string container_id = 1; + string exec_id = 2; + bool stdin = 3; } message PauseTaskRequest { - string container_id = 1; + string container_id = 1; } message ResumeTaskRequest { - string container_id = 1; + string container_id = 1; } message ListPidsRequest { - string container_id = 1; + string container_id = 1; } message ListPidsResponse { - // Processes includes the process ID and additional process information - repeated containerd.v1.types.ProcessInfo processes = 1; + // Processes includes the process ID and additional process information + repeated containerd.v1.types.ProcessInfo processes = 1; } message CheckpointTaskRequest { - string container_id = 1; - string parent_checkpoint = 2; - google.protobuf.Any options = 3; + string container_id = 1; + string parent_checkpoint = 2; + google.protobuf.Any options = 3; } message CheckpointTaskResponse { - repeated containerd.types.Descriptor descriptors = 1; + repeated containerd.types.Descriptor descriptors = 1; } message UpdateTaskRequest { - string container_id = 1; - google.protobuf.Any resources = 2; - map annotations = 3; + string container_id = 1; + google.protobuf.Any resources = 2; + map annotations = 3; } message MetricsRequest { - repeated string filters = 1; + repeated string filters = 1; } message MetricsResponse { - repeated types.Metric metrics = 1; + repeated types.Metric metrics = 1; } message WaitRequest { - string container_id = 1; - string exec_id = 2; + string container_id = 1; + string exec_id = 2; } message WaitResponse { - uint32 exit_status = 1; - google.protobuf.Timestamp exited_at = 2; + uint32 exit_status = 1; + google.protobuf.Timestamp exited_at = 2; } diff --git a/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto b/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto index a8f25ee593ef2..0ad0ae8e22b16 100644 --- a/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto +++ b/vendor/github.com/containerd/containerd/api/services/transfer/v1/transfer.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,16 +24,16 @@ import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/transfer/v1;transfer"; service Transfer { - rpc Transfer(TransferRequest) returns (google.protobuf.Empty); + rpc Transfer(TransferRequest) returns (google.protobuf.Empty); } message TransferRequest { - google.protobuf.Any source = 1; - google.protobuf.Any destination = 2; - TransferOptions options = 3; + google.protobuf.Any source = 1; + google.protobuf.Any destination = 2; + TransferOptions options = 3; } message TransferOptions { - string progress_stream = 1; - // Progress min interval + string progress_stream = 1; + // Progress min interval } diff --git a/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto b/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto index 449fd5f03b6cd..8b5527328d811 100644 --- a/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto +++ b/vendor/github.com/containerd/containerd/api/services/ttrpc/events/v1/events.proto @@ -1,37 +1,37 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.services.events.ttrpc.v1; -import "types/event.proto"; import "google/protobuf/empty.proto"; +import "types/event.proto"; option go_package = "github.com/containerd/containerd/api/services/ttrpc/events/v1;events"; service Events { - // Forward sends an event that has already been packaged into an envelope - // with a timestamp and namespace. - // - // This is useful if earlier timestamping is required or when forwarding on - // behalf of another component, namespace or publisher. - rpc Forward(ForwardRequest) returns (google.protobuf.Empty); + // Forward sends an event that has already been packaged into an envelope + // with a timestamp and namespace. + // + // This is useful if earlier timestamping is required or when forwarding on + // behalf of another component, namespace or publisher. + rpc Forward(ForwardRequest) returns (google.protobuf.Empty); } message ForwardRequest { - containerd.types.Envelope envelope = 1; + containerd.types.Envelope envelope = 1; } diff --git a/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto b/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto index bd948ff343b3b..c331098e59a75 100644 --- a/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto +++ b/vendor/github.com/containerd/containerd/api/services/version/v1/version.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,10 +24,10 @@ import "google/protobuf/empty.proto"; option go_package = "github.com/containerd/containerd/api/services/version/v1;version"; service Version { - rpc Version(google.protobuf.Empty) returns (VersionResponse); + rpc Version(google.protobuf.Empty) returns (VersionResponse); } message VersionResponse { - string version = 1; - string revision = 2; + string version = 1; + string revision = 2; } diff --git a/vendor/github.com/containerd/containerd/api/types/descriptor.proto b/vendor/github.com/containerd/containerd/api/types/descriptor.proto index faaf416dd10cc..9baadad196583 100644 --- a/vendor/github.com/containerd/containerd/api/types/descriptor.proto +++ b/vendor/github.com/containerd/containerd/api/types/descriptor.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -26,8 +26,8 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // oci descriptor found in a manifest. // See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor message Descriptor { - string media_type = 1; - string digest = 2; - int64 size = 3; - map annotations = 5; + string media_type = 1; + string digest = 2; + int64 size = 3; + map annotations = 5; } diff --git a/vendor/github.com/containerd/containerd/api/types/event.proto b/vendor/github.com/containerd/containerd/api/types/event.proto index 4ca4379f1171e..0b9c3fb9375ce 100644 --- a/vendor/github.com/containerd/containerd/api/types/event.proto +++ b/vendor/github.com/containerd/containerd/api/types/event.proto @@ -1,33 +1,33 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.types; -import "types/fieldpath.proto"; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; +import "types/fieldpath.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message Envelope { - option (containerd.types.fieldpath) = true; - google.protobuf.Timestamp timestamp = 1; - string namespace = 2; - string topic = 3; - google.protobuf.Any event = 4; + option (containerd.types.fieldpath) = true; + google.protobuf.Timestamp timestamp = 1; + string namespace = 2; + string topic = 3; + google.protobuf.Any event = 4; } diff --git a/vendor/github.com/containerd/containerd/api/types/fieldpath.proto b/vendor/github.com/containerd/containerd/api/types/fieldpath.proto index 8b290842b010b..bb5591da5eaa4 100644 --- a/vendor/github.com/containerd/containerd/api/types/fieldpath.proto +++ b/vendor/github.com/containerd/containerd/api/types/fieldpath.proto @@ -34,9 +34,9 @@ import "google/protobuf/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; extend google.protobuf.FileOptions { - optional bool fieldpath_all = 63300; + optional bool fieldpath_all = 63300; } extend google.protobuf.MessageOptions { - optional bool fieldpath = 64400; + optional bool fieldpath = 64400; } diff --git a/vendor/github.com/containerd/containerd/api/types/introspection.proto b/vendor/github.com/containerd/containerd/api/types/introspection.proto index 8f3fcb5a48279..5ce83bfe0cdfd 100644 --- a/vendor/github.com/containerd/containerd/api/types/introspection.proto +++ b/vendor/github.com/containerd/containerd/api/types/introspection.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,24 +23,24 @@ import "google/protobuf/any.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message RuntimeRequest { - string runtime_path = 1; - // Options correspond to CreateTaskRequest.options. - // This is needed to pass the runc binary path, etc. - google.protobuf.Any options = 2; + string runtime_path = 1; + // Options correspond to CreateTaskRequest.options. + // This is needed to pass the runc binary path, etc. + google.protobuf.Any options = 2; } message RuntimeVersion { - string version = 1; - string revision = 2; + string version = 1; + string revision = 2; } message RuntimeInfo { - string name = 1; - RuntimeVersion version = 2; - // Options correspond to RuntimeInfoRequest.Options (contains runc binary path, etc.) - google.protobuf.Any options = 3; - // OCI-compatible runtimes should use https://github.com/opencontainers/runtime-spec/blob/main/features.md - google.protobuf.Any features = 4; - // Annotations of the shim. Irrelevant to features.Annotations. - map annotations = 5; + string name = 1; + RuntimeVersion version = 2; + // Options correspond to RuntimeInfoRequest.Options (contains runc binary path, etc.) + google.protobuf.Any options = 3; + // OCI-compatible runtimes should use https://github.com/opencontainers/runtime-spec/blob/main/features.md + google.protobuf.Any features = 4; + // Annotations of the shim. Irrelevant to features.Annotations. + map annotations = 5; } diff --git a/vendor/github.com/containerd/containerd/api/types/metrics.proto b/vendor/github.com/containerd/containerd/api/types/metrics.proto index 3e6a7751e37ca..d1a7d49cc3aa7 100644 --- a/vendor/github.com/containerd/containerd/api/types/metrics.proto +++ b/vendor/github.com/containerd/containerd/api/types/metrics.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -24,7 +24,7 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types;types"; message Metric { - google.protobuf.Timestamp timestamp = 1; - string id = 2; - google.protobuf.Any data = 3; + google.protobuf.Timestamp timestamp = 1; + string id = 2; + google.protobuf.Any data = 3; } diff --git a/vendor/github.com/containerd/containerd/api/types/mount.proto b/vendor/github.com/containerd/containerd/api/types/mount.proto index 2f3b0b622903a..05fd4532bc633 100644 --- a/vendor/github.com/containerd/containerd/api/types/mount.proto +++ b/vendor/github.com/containerd/containerd/api/types/mount.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -30,36 +30,36 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // The Mount type follows the structure of the mount syscall, including a type, // source, target and options. message Mount { - // Type defines the nature of the mount. - string type = 1; + // Type defines the nature of the mount. + string type = 1; - // Source specifies the name of the mount. Depending on mount type, this - // may be a volume name or a host path, or even ignored. - string source = 2; + // Source specifies the name of the mount. Depending on mount type, this + // may be a volume name or a host path, or even ignored. + string source = 2; - // Target path in container - string target = 3; + // Target path in container + string target = 3; - // Options specifies zero or more fstab style mount options. - repeated string options = 4; + // Options specifies zero or more fstab style mount options. + repeated string options = 4; } message ActiveMount { - Mount mount = 1; + Mount mount = 1; - google.protobuf.Timestamp mounted_at = 2; + google.protobuf.Timestamp mounted_at = 2; - string mount_point = 3; + string mount_point = 3; - map data = 4; + map data = 4; } message ActivationInfo { - string name = 1; + string name = 1; - repeated ActiveMount active = 2; + repeated ActiveMount active = 2; - repeated Mount system = 3; + repeated Mount system = 3; - map labels = 4; + map labels = 4; } diff --git a/vendor/github.com/containerd/containerd/api/types/platform.proto b/vendor/github.com/containerd/containerd/api/types/platform.proto index 0b9180016de47..c56b6de299306 100644 --- a/vendor/github.com/containerd/containerd/api/types/platform.proto +++ b/vendor/github.com/containerd/containerd/api/types/platform.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,8 +23,8 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // Platform follows the structure of the OCI platform specification, from // descriptors. message Platform { - string os = 1; - string architecture = 2; - string variant = 3; - string os_version = 4; + string os = 1; + string architecture = 2; + string variant = 3; + string os_version = 4; } diff --git a/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto b/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto index a30b5bbff82aa..b1866374a3a44 100644 --- a/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto +++ b/vendor/github.com/containerd/containerd/api/types/runc/options/oci.proto @@ -5,59 +5,59 @@ package containerd.runc.v1; option go_package = "github.com/containerd/containerd/api/types/runc/options;options"; message Options { - // disable pivot root when creating a container - bool no_pivot_root = 1; - // create a new keyring for the container - bool no_new_keyring = 2; - // place the shim in a cgroup - string shim_cgroup = 3; - // set the I/O's pipes uid - uint32 io_uid = 4; - // set the I/O's pipes gid - uint32 io_gid = 5; - // binary name of the runc binary - string binary_name = 6; - // runc root directory - string root = 7; - // criu binary path. - // - // Removed in containerd v2.0: string criu_path = 8; - reserved 8; - // enable systemd cgroups - bool systemd_cgroup = 9; - // criu image path - string criu_image_path = 10; - // criu work path - string criu_work_path = 11; - // task api address, can be a unix domain socket, or vsock address. - // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. - string task_api_address = 12; - // task api version, currently supported value is 2 and 3. - uint32 task_api_version = 13; + // disable pivot root when creating a container + bool no_pivot_root = 1; + // create a new keyring for the container + bool no_new_keyring = 2; + // place the shim in a cgroup + string shim_cgroup = 3; + // set the I/O's pipes uid + uint32 io_uid = 4; + // set the I/O's pipes gid + uint32 io_gid = 5; + // binary name of the runc binary + string binary_name = 6; + // runc root directory + string root = 7; + // criu binary path. + // + // Removed in containerd v2.0: string criu_path = 8; + reserved 8; + // enable systemd cgroups + bool systemd_cgroup = 9; + // criu image path + string criu_image_path = 10; + // criu work path + string criu_work_path = 11; + // task api address, can be a unix domain socket, or vsock address. + // it is in the form of ttrpc+unix://path/to/uds or grpc+vsock://:. + string task_api_address = 12; + // task api version, currently supported value is 2 and 3. + uint32 task_api_version = 13; } message CheckpointOptions { - // exit the container after a checkpoint - bool exit = 1; - // checkpoint open tcp connections - bool open_tcp = 2; - // checkpoint external unix sockets - bool external_unix_sockets = 3; - // checkpoint terminals (ptys) - bool terminal = 4; - // allow checkpointing of file locks - bool file_locks = 5; - // restore provided namespaces as empty namespaces - repeated string empty_namespaces = 6; - // set the cgroups mode, soft, full, strict - string cgroups_mode = 7; - // checkpoint image path - string image_path = 8; - // checkpoint work path - string work_path = 9; + // exit the container after a checkpoint + bool exit = 1; + // checkpoint open tcp connections + bool open_tcp = 2; + // checkpoint external unix sockets + bool external_unix_sockets = 3; + // checkpoint terminals (ptys) + bool terminal = 4; + // allow checkpointing of file locks + bool file_locks = 5; + // restore provided namespaces as empty namespaces + repeated string empty_namespaces = 6; + // set the cgroups mode, soft, full, strict + string cgroups_mode = 7; + // checkpoint image path + string image_path = 8; + // checkpoint work path + string work_path = 9; } message ProcessDetails { - // exec process id if the process is managed by a shim - string exec_id = 1; + // exec process id if the process is managed by a shim + string exec_id = 1; } diff --git a/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto b/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto index f0a7d56b8b1fa..95864dcf3b458 100644 --- a/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto +++ b/vendor/github.com/containerd/containerd/api/types/runtimeoptions/v1/api.proto @@ -6,12 +6,12 @@ package runtimeoptions.v1; option go_package = "github.com/containerd/containerd/api/types/runtimeoptions/v1;runtimeoptions"; message Options { - // TypeUrl specifies the type of the content inside the config file. - string type_url = 1; - // ConfigPath specifies the filesystem location of the config file - // used by the runtime. - string config_path = 2; - // Blob specifies an in-memory TOML blob passed from containerd's configuration section - // for this runtime. This will be used if config_path is not specified. - bytes config_body = 3; + // TypeUrl specifies the type of the content inside the config file. + string type_url = 1; + // ConfigPath specifies the filesystem location of the config file + // used by the runtime. + string config_path = 2; + // Blob specifies an in-memory TOML blob passed from containerd's configuration section + // for this runtime. This will be used if config_path is not specified. + bytes config_body = 3; } diff --git a/vendor/github.com/containerd/containerd/api/types/sandbox.proto b/vendor/github.com/containerd/containerd/api/types/sandbox.proto index b0bf233b954bf..023644192579d 100644 --- a/vendor/github.com/containerd/containerd/api/types/sandbox.proto +++ b/vendor/github.com/containerd/containerd/api/types/sandbox.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -26,29 +26,28 @@ option go_package = "github.com/containerd/containerd/api/types;types"; // Sandbox represents a sandbox metadata object that keeps all info required by controller to // work with a particular instance. message Sandbox { - // SandboxID is a unique instance identifier within namespace - string sandbox_id = 1; - message Runtime { - // Name is the name of the runtime. - string name = 1; - // Options specify additional runtime initialization options for the shim (this data will be available in StartShim). - // Typically this data expected to be runtime shim implementation specific. - google.protobuf.Any options = 2; - } - // Runtime specifies which runtime to use for executing this container. - Runtime runtime = 2; - // Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the - // bundle directory (similary to OCI spec). - google.protobuf.Any spec = 3; - // Labels provides an area to include arbitrary data on containers. - map labels = 4; - // CreatedAt is the time the container was first created. - google.protobuf.Timestamp created_at = 5; - // UpdatedAt is the last time the container was mutated. - google.protobuf.Timestamp updated_at = 6; - // Extensions allow clients to provide optional blobs that can be handled by runtime. - map extensions = 7; - // Sandboxer is the name of the sandbox controller who manages the sandbox. - string sandboxer = 10; - + // SandboxID is a unique instance identifier within namespace + string sandbox_id = 1; + message Runtime { + // Name is the name of the runtime. + string name = 1; + // Options specify additional runtime initialization options for the shim (this data will be available in StartShim). + // Typically this data expected to be runtime shim implementation specific. + google.protobuf.Any options = 2; + } + // Runtime specifies which runtime to use for executing this container. + Runtime runtime = 2; + // Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the + // bundle directory (similary to OCI spec). + google.protobuf.Any spec = 3; + // Labels provides an area to include arbitrary data on containers. + map labels = 4; + // CreatedAt is the time the container was first created. + google.protobuf.Timestamp created_at = 5; + // UpdatedAt is the last time the container was mutated. + google.protobuf.Timestamp updated_at = 6; + // Extensions allow clients to provide optional blobs that can be handled by runtime. + map extensions = 7; + // Sandboxer is the name of the sandbox controller who manages the sandbox. + string sandboxer = 10; } diff --git a/vendor/github.com/containerd/containerd/api/types/task/task.proto b/vendor/github.com/containerd/containerd/api/types/task/task.proto index afc8e94bb4770..3a06236fac716 100644 --- a/vendor/github.com/containerd/containerd/api/types/task/task.proto +++ b/vendor/github.com/containerd/containerd/api/types/task/task.proto @@ -1,55 +1,55 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.v1.types; -import "google/protobuf/timestamp.proto"; import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types/task"; enum Status { - UNKNOWN = 0; - CREATED = 1; - RUNNING = 2; - STOPPED = 3; - PAUSED = 4; - PAUSING = 5; + UNKNOWN = 0; + CREATED = 1; + RUNNING = 2; + STOPPED = 3; + PAUSED = 4; + PAUSING = 5; } message Process { - string container_id = 1; - string id = 2; - uint32 pid = 3; - Status status = 4; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; - uint32 exit_status = 9; - google.protobuf.Timestamp exited_at = 10; + string container_id = 1; + string id = 2; + uint32 pid = 3; + Status status = 4; + string stdin = 5; + string stdout = 6; + string stderr = 7; + bool terminal = 8; + uint32 exit_status = 9; + google.protobuf.Timestamp exited_at = 10; } message ProcessInfo { - // PID is the process ID. - uint32 pid = 1; - // Info contains additional process information. - // - // Info varies by platform. - google.protobuf.Any info = 2; + // PID is the process ID. + uint32 pid = 1; + // Info contains additional process information. + // + // Info varies by platform. + google.protobuf.Any info = 2; } diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto b/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto index fbcaa567c5095..c3c14c9b10fc6 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/imagestore.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,60 +23,60 @@ import "types/platform.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message ImageStore { - string name = 1; - map labels = 2; + string name = 1; + map labels = 2; - // Content filters + // Content filters - repeated types.Platform platforms = 3; - bool all_metadata = 4; - uint32 manifest_limit = 5; + repeated types.Platform platforms = 3; + bool all_metadata = 4; + uint32 manifest_limit = 5; - // Import naming + // Import naming - // extra_references are used to set image names on imports of sub-images from the index - repeated ImageReference extra_references = 6; + // extra_references are used to set image names on imports of sub-images from the index + repeated ImageReference extra_references = 6; - // Unpack Configuration, multiple allowed + // Unpack Configuration, multiple allowed - repeated UnpackConfiguration unpacks = 10; + repeated UnpackConfiguration unpacks = 10; } message UnpackConfiguration { - // platform is the platform to unpack for, used for resolving manifest and snapshotter - // if not provided - types.Platform platform = 1; + // platform is the platform to unpack for, used for resolving manifest and snapshotter + // if not provided + types.Platform platform = 1; - // snapshotter to unpack to, if not provided default for platform shoudl be used - string snapshotter = 2; + // snapshotter to unpack to, if not provided default for platform shoudl be used + string snapshotter = 2; } // ImageReference is used to create or find a reference for an image message ImageReference { - string name = 1; - - // is_prefix determines whether the Name should be considered - // a prefix (without tag or digest). - // For lookup, this may allow matching multiple tags. - // For store, this must have a tag or digest added. - bool is_prefix = 2; - - // allow_overwrite allows overwriting or ignoring the name if - // another reference is provided (such as through an annotation). - // Only used if IsPrefix is true. - bool allow_overwrite = 3; - - // add_digest adds the manifest digest to the reference. - // For lookup, this allows matching tags with any digest. - // For store, this allows adding the digest to the name. - // Only used if IsPrefix is true. - bool add_digest = 4; - - // skip_named_digest only considers digest references which do not - // have a non-digested named reference. - // For lookup, this will deduplicate digest references when there is a named match. - // For store, this only adds this digest reference when there is no matching full - // name reference from the prefix. - // Only used if IsPrefix is true. - bool skip_named_digest = 5; + string name = 1; + + // is_prefix determines whether the Name should be considered + // a prefix (without tag or digest). + // For lookup, this may allow matching multiple tags. + // For store, this must have a tag or digest added. + bool is_prefix = 2; + + // allow_overwrite allows overwriting or ignoring the name if + // another reference is provided (such as through an annotation). + // Only used if IsPrefix is true. + bool allow_overwrite = 3; + + // add_digest adds the manifest digest to the reference. + // For lookup, this allows matching tags with any digest. + // For store, this allows adding the digest to the name. + // Only used if IsPrefix is true. + bool add_digest = 4; + + // skip_named_digest only considers digest references which do not + // have a non-digested named reference. + // For lookup, this will deduplicate digest references when there is a named match. + // For store, this only adds this digest reference when there is no matching full + // name reference from the prefix. + // Only used if IsPrefix is true. + bool skip_named_digest = 5; } diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto b/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto index 7660fa0e30603..7d6c754020346 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/importexport.proto @@ -1,52 +1,52 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; package containerd.types.transfer; -option go_package = "github.com/containerd/containerd/api/types/transfer"; - import "types/platform.proto"; +option go_package = "github.com/containerd/containerd/api/types/transfer"; + message ImageImportStream { - // Stream is used to identify the binary input stream for the import operation. - // The stream uses the transfer binary stream protocol with the client as the sender. - // The binary data is expected to be a raw tar stream. - string stream = 1; + // Stream is used to identify the binary input stream for the import operation. + // The stream uses the transfer binary stream protocol with the client as the sender. + // The binary data is expected to be a raw tar stream. + string stream = 1; - string media_type = 2; + string media_type = 2; - bool force_compress = 3; + bool force_compress = 3; } message ImageExportStream { - // Stream is used to identify the binary output stream for the export operation. - // The stream uses the transfer binary stream protocol with the server as the sender. - // The binary data is expected to be a raw tar stream. - string stream = 1; - - string media_type = 2; - - // The specified platforms - repeated types.Platform platforms = 3; - // Whether to include all platforms - bool all_platforms = 4; - // Skips the creation of the Docker compatible manifest.json file - bool skip_compatibility_manifest = 5; - // Excludes non-distributable blobs such as Windows base layers. - bool skip_non_distributable = 6; + // Stream is used to identify the binary output stream for the export operation. + // The stream uses the transfer binary stream protocol with the server as the sender. + // The binary data is expected to be a raw tar stream. + string stream = 1; + + string media_type = 2; + + // The specified platforms + repeated types.Platform platforms = 3; + // Whether to include all platforms + bool all_platforms = 4; + // Skips the creation of the Docker compatible manifest.json file + bool skip_compatibility_manifest = 5; + // Excludes non-distributable blobs such as Windows base layers. + bool skip_non_distributable = 6; } diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto b/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto index 712ed6a061d56..81858dbcdf5bc 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/progress.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,10 +23,10 @@ import "types/descriptor.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message Progress { - string event = 1; - string name = 2; - repeated string parents = 3; - int64 progress = 4; - int64 total = 5; - containerd.types.Descriptor desc = 6; + string event = 1; + string name = 2; + repeated string parents = 3; + int64 progress = 4; + int64 total = 5; + containerd.types.Descriptor desc = 6; } diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto b/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto index 88248fd56fea7..cf614d2fdd4f1 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/registry.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -23,75 +23,75 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/containerd/containerd/api/types/transfer"; message OCIRegistry { - string reference = 1; - RegistryResolver resolver = 2; + string reference = 1; + RegistryResolver resolver = 2; } enum HTTPDebug { - DISABLED = 0; - // Enable HTTP debugging - DEBUG = 1; - // Enable HTTP requests tracing - TRACE = 2; - // Enable both HTTP debugging and requests tracing - BOTH = 3; + DISABLED = 0; + // Enable HTTP debugging + DEBUG = 1; + // Enable HTTP requests tracing + TRACE = 2; + // Enable both HTTP debugging and requests tracing + BOTH = 3; } message RegistryResolver { - // auth_stream is used to refer to a stream which auth callbacks may be - // made on. - string auth_stream = 1; + // auth_stream is used to refer to a stream which auth callbacks may be + // made on. + string auth_stream = 1; - // Headers - map headers = 2; + // Headers + map headers = 2; - string host_dir = 3; + string host_dir = 3; - string default_scheme = 4; - // Force skip verify - // CA callback? Client TLS callback? + string default_scheme = 4; + // Force skip verify + // CA callback? Client TLS callback? - // Whether to debug/trace HTTP requests to OCI registry. - HTTPDebug http_debug = 5; + // Whether to debug/trace HTTP requests to OCI registry. + HTTPDebug http_debug = 5; - // Stream ID to use for HTTP logs (when logs are streamed to client). - // When empty, logs are written to containerd logs. - string logs_stream = 6; + // Stream ID to use for HTTP logs (when logs are streamed to client). + // When empty, logs are written to containerd logs. + string logs_stream = 6; } // AuthRequest is sent as a callback on a stream message AuthRequest { - // host is the registry host - string host = 1; + // host is the registry host + string host = 1; - // reference is the namespace and repository name requested from the registry - string reference = 2; + // reference is the namespace and repository name requested from the registry + string reference = 2; - // wwwauthenticate is the HTTP WWW-Authenticate header values returned from the registry - repeated string wwwauthenticate = 3; + // wwwauthenticate is the HTTP WWW-Authenticate header values returned from the registry + repeated string wwwauthenticate = 3; } enum AuthType { - NONE = 0; + NONE = 0; - // CREDENTIALS is used to exchange username/password for access token - // using an oauth or "Docker Registry Token" server - CREDENTIALS = 1; + // CREDENTIALS is used to exchange username/password for access token + // using an oauth or "Docker Registry Token" server + CREDENTIALS = 1; - // REFRESH is used to exchange secret for access token using an oauth - // or "Docker Registry Token" server - REFRESH = 2; + // REFRESH is used to exchange secret for access token using an oauth + // or "Docker Registry Token" server + REFRESH = 2; - // HEADER is used to set the HTTP Authorization header to secret - // directly for the registry. - // Value should be ` ` - HEADER = 3; + // HEADER is used to set the HTTP Authorization header to secret + // directly for the registry. + // Value should be ` ` + HEADER = 3; } message AuthResponse { - AuthType authType = 1; - string secret = 2; - string username = 3; - google.protobuf.Timestamp expire_at = 4; - // TODO: Stream error + AuthType authType = 1; + string secret = 2; + string username = 3; + google.protobuf.Timestamp expire_at = 4; + // TODO: Stream error } diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto b/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto index 234956c2c2c2f..e01e70360d8af 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto @@ -1,17 +1,17 @@ /* - Copyright The containerd Authors. + Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ syntax = "proto3"; @@ -21,9 +21,9 @@ package containerd.types.transfer; option go_package = "github.com/containerd/containerd/api/types/transfer"; message Data { - bytes data = 1; + bytes data = 1; } message WindowUpdate { - int32 update = 1; + int32 update = 1; } From eeb50b0e9ad2932fed1ee05f42165d627a0230ed Mon Sep 17 00:00:00 2001 From: Champ-Goblem Date: Mon, 2 Feb 2026 12:24:44 +0000 Subject: [PATCH 4/4] cri: use mount manager when image has volumes When a container image has a volumes attribute, currently the mount manager is not used here. This leads to issues with the EROFS snapshotter, notably that rwlayer.img is not present when the snapshotter is configured to create a writable block volume. This change implements mount manager as part of the image volumes processing, so that mount manager mounts are correctly processes before calling mount.All Fixes: #12834 Signed-off-by: Champ-Goblem --- internal/cri/opts/container.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/internal/cri/opts/container.go b/internal/cri/opts/container.go index 52a46aa0e1859..3932e5fe60840 100644 --- a/internal/cri/opts/container.go +++ b/internal/cri/opts/container.go @@ -81,6 +81,18 @@ func WithVolumes(volumeMounts map[string]string, platform imagespec.Platform) co // the case here. mounts = mount.RemoveIDMapOption(mounts) + mm := client.MountManager() + activationKey := fmt.Sprintf("cri-volume-%s", c.SnapshotKey) + var needsDeactivation bool + + info, err := mm.Activate(ctx, activationKey, mounts) + if err == nil { + mounts = info.System + needsDeactivation = true + } else if !errdefs.IsNotImplemented(err) { + return fmt.Errorf("failed to activate mounts: %w", err) + } + root, err := os.MkdirTemp("", "ctd-volume") if err != nil { return err @@ -101,6 +113,15 @@ func WithVolumes(volumeMounts map[string]string, platform imagespec.Platform) co err = uerr } } + // If we used mount manager, deactivate to cleanup transformers + if needsDeactivation { + if derr := mm.Deactivate(ctx, activationKey); derr != nil { + log.G(ctx).WithError(derr).Errorf("Failed to deactivate mount manager %q", activationKey) + if err == nil { + err = derr + } + } + } }() for host, volume := range volumeMounts {