diff --git a/api/buf.lock b/api/buf.lock index 5df8acde68cb5..ab5dd9737e059 100644 --- a/api/buf.lock +++ b/api/buf.lock @@ -2,5 +2,5 @@ version: v2 deps: - name: buf.build/googleapis/googleapis - commit: 004180b77378443887d3b55cabc00384 - digest: b5:e8f475fe3330f31f5fd86ac689093bcd274e19611a09db91f41d637cb9197881ce89882b94d13a58738e53c91c6e4bae7dc1feba85f590164c975a89e25115dc + commit: 536964a08a534d51b8f30f2d6751f1f9 + digest: b5:3e05d27e797b00c345fadd3c15cf0e16c4cc693036a55059721e66d6ce22a96264a4897658c9243bb0874fa9ca96e437589eb512189d2754604a626c632f6030 diff --git a/api/next.txtpb b/api/next.txtpb index 13943112709a8..62021c67acb2f 100644 --- a/api/next.txtpb +++ b/api/next.txtpb @@ -48418,7 +48418,7 @@ file: { owner: "googleapis" repository: "googleapis" } - commit: "004180b77378443887d3b55cabc00384" + commit: "536964a08a534d51b8f30f2d6751f1f9" } is_syntax_unspecified: false } @@ -68682,6 +68682,265 @@ file: { is_syntax_unspecified: false } } +file: { + name: "types/transfer/container.proto" + package: "containerd.types.transfer" + message_type: { + name: "ContainerPath" + field: { + name: "container_id" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "containerId" + } + field: { + name: "path" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "path" + } + field: { + name: "no_walk" + number: 3 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "noWalk" + } + field: { + name: "preserve_ownership" + number: 4 + label: LABEL_OPTIONAL + type: TYPE_BOOL + json_name: "preserveOwnership" + } + } + options: { + go_package: "github.com/containerd/containerd/api/types/transfer" + } + source_code_info: { + location: { + span: 15 + span: 0 + span: 38 + span: 1 + } + location: { + path: 12 + span: 15 + span: 0 + span: 18 + leading_comments: "\nCopyright The containerd Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n" + } + location: { + path: 2 + span: 18 + span: 0 + span: 34 + } + location: { + path: 8 + span: 20 + span: 0 + span: 74 + } + location: { + path: 8 + path: 11 + span: 20 + span: 0 + span: 74 + } + location: { + path: 4 + path: 0 + span: 25 + span: 0 + span: 38 + span: 1 + leading_comments: " ContainerPath represents a path within an active container's\n filesystem. It acts as either a source or destination in a transfer\n operation, identifying the container and path for archive operations.\n" + } + location: { + path: 4 + path: 0 + path: 1 + span: 25 + span: 8 + span: 21 + } + location: { + path: 4 + path: 0 + path: 2 + path: 0 + span: 26 + span: 8 + span: 32 + } + location: { + path: 4 + path: 0 + path: 2 + path: 0 + path: 5 + span: 26 + span: 8 + span: 14 + } + location: { + path: 4 + path: 0 + path: 2 + path: 0 + path: 1 + span: 26 + span: 15 + span: 27 + } + location: { + path: 4 + path: 0 + path: 2 + path: 0 + path: 3 + span: 26 + span: 30 + span: 31 + } + location: { + path: 4 + path: 0 + path: 2 + path: 1 + span: 27 + span: 8 + span: 24 + } + location: { + path: 4 + path: 0 + path: 2 + path: 1 + path: 5 + span: 27 + span: 8 + span: 14 + } + location: { + path: 4 + path: 0 + path: 2 + path: 1 + path: 1 + span: 27 + span: 15 + span: 19 + } + location: { + path: 4 + path: 0 + path: 2 + path: 1 + path: 3 + span: 27 + span: 22 + span: 23 + } + location: { + path: 4 + path: 0 + path: 2 + path: 2 + span: 32 + span: 8 + span: 25 + leading_comments: " When true and path is a directory, return only the directory entry\n itself without walking into its contents. This is useful for\n stat-like operations where only the directory's metadata is needed.\n" + } + location: { + path: 4 + path: 0 + path: 2 + path: 2 + path: 5 + span: 32 + span: 8 + span: 12 + } + location: { + path: 4 + path: 0 + path: 2 + path: 2 + path: 1 + span: 32 + span: 13 + span: 20 + } + location: { + path: 4 + path: 0 + path: 2 + path: 2 + path: 3 + span: 32 + span: 23 + span: 24 + } + location: { + path: 4 + path: 0 + path: 2 + path: 3 + span: 37 + span: 8 + span: 36 + leading_comments: " When true, preserve the UID/GID from tar headers when extracting\n files. When false, extracted files are owned by the extracting\n process.\n" + } + location: { + path: 4 + path: 0 + path: 2 + path: 3 + path: 5 + span: 37 + span: 8 + span: 12 + } + location: { + path: 4 + path: 0 + path: 2 + path: 3 + path: 1 + span: 37 + span: 13 + span: 31 + } + location: { + path: 4 + path: 0 + path: 2 + path: 3 + path: 3 + span: 37 + span: 34 + span: 35 + } + } + syntax: "proto3" + buf_extension: { + is_import: false + module_info: { + name: { + remote: "buf.build" + owner: "containerd" + repository: "api-dev" + } + } + is_syntax_unspecified: false + } +} file: { name: "types/transfer/imagestore.proto" package: "containerd.types.transfer" @@ -71610,6 +71869,40 @@ file: { json_name: "update" } } + message_type: { + name: "ReadStream" + field: { + name: "stream" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "stream" + } + field: { + name: "media_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "mediaType" + } + } + message_type: { + name: "WriteStream" + field: { + name: "stream" + number: 1 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "stream" + } + field: { + name: "media_type" + number: 2 + label: LABEL_OPTIONAL + type: TYPE_STRING + json_name: "mediaType" + } + } options: { go_package: "github.com/containerd/containerd/api/types/transfer" } @@ -71617,7 +71910,7 @@ file: { location: { span: 16 span: 0 - span: 28 + span: 44 span: 1 } location: { @@ -71756,6 +72049,196 @@ file: { span: 17 span: 18 } + location: { + path: 4 + path: 2 + span: 33 + span: 0 + span: 36 + span: 1 + leading_comments: " ReadStream carries data from the client to the server (import\n direction). The client sends data through the stream and the\n server reads it.\n" + } + location: { + path: 4 + path: 2 + path: 1 + span: 33 + span: 8 + span: 18 + } + location: { + path: 4 + path: 2 + path: 2 + path: 0 + span: 34 + span: 8 + span: 26 + } + location: { + path: 4 + path: 2 + path: 2 + path: 0 + path: 5 + span: 34 + span: 8 + span: 14 + } + location: { + path: 4 + path: 2 + path: 2 + path: 0 + path: 1 + span: 34 + span: 15 + span: 21 + } + location: { + path: 4 + path: 2 + path: 2 + path: 0 + path: 3 + span: 34 + span: 24 + span: 25 + } + location: { + path: 4 + path: 2 + path: 2 + path: 1 + span: 35 + span: 8 + span: 30 + } + location: { + path: 4 + path: 2 + path: 2 + path: 1 + path: 5 + span: 35 + span: 8 + span: 14 + } + location: { + path: 4 + path: 2 + path: 2 + path: 1 + path: 1 + span: 35 + span: 15 + span: 25 + } + location: { + path: 4 + path: 2 + path: 2 + path: 1 + path: 3 + span: 35 + span: 28 + span: 29 + } + location: { + path: 4 + path: 3 + span: 41 + span: 0 + span: 44 + span: 1 + leading_comments: " WriteStream carries data from the server to the client (export\n direction). The server writes data into the stream and the\n client receives it.\n" + } + location: { + path: 4 + path: 3 + path: 1 + span: 41 + span: 8 + span: 19 + } + location: { + path: 4 + path: 3 + path: 2 + path: 0 + span: 42 + span: 8 + span: 26 + } + location: { + path: 4 + path: 3 + path: 2 + path: 0 + path: 5 + span: 42 + span: 8 + span: 14 + } + location: { + path: 4 + path: 3 + path: 2 + path: 0 + path: 1 + span: 42 + span: 15 + span: 21 + } + location: { + path: 4 + path: 3 + path: 2 + path: 0 + path: 3 + span: 42 + span: 24 + span: 25 + } + location: { + path: 4 + path: 3 + path: 2 + path: 1 + span: 43 + span: 8 + span: 30 + } + location: { + path: 4 + path: 3 + path: 2 + path: 1 + path: 5 + span: 43 + span: 8 + span: 14 + } + location: { + path: 4 + path: 3 + path: 2 + path: 1 + path: 1 + span: 43 + span: 15 + span: 25 + } + location: { + path: 4 + path: 3 + path: 2 + path: 1 + path: 3 + span: 43 + span: 28 + span: 29 + } } syntax: "proto3" buf_extension: { diff --git a/api/types/transfer/container.pb.go b/api/types/transfer/container.pb.go new file mode 100644 index 0000000000000..ec4cccbfd5401 --- /dev/null +++ b/api/types/transfer/container.pb.go @@ -0,0 +1,201 @@ +// +//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 +// +//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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: types/transfer/container.proto + +package transfer + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ContainerPath represents a path within an active container's +// filesystem. It acts as either a source or destination in a transfer +// operation, identifying the container and path for archive operations. +type ContainerPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // When true and path is a directory, return only the directory entry + // itself without walking into its contents. This is useful for + // stat-like operations where only the directory's metadata is needed. + NoWalk bool `protobuf:"varint,3,opt,name=no_walk,json=noWalk,proto3" json:"no_walk,omitempty"` + // When true, preserve the UID/GID from tar headers when extracting + // files. When false, extracted files are owned by the extracting + // process. + PreserveOwnership bool `protobuf:"varint,4,opt,name=preserve_ownership,json=preserveOwnership,proto3" json:"preserve_ownership,omitempty"` +} + +func (x *ContainerPath) Reset() { + *x = ContainerPath{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_container_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerPath) ProtoMessage() {} + +func (x *ContainerPath) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_container_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerPath.ProtoReflect.Descriptor instead. +func (*ContainerPath) Descriptor() ([]byte, []int) { + return file_types_transfer_container_proto_rawDescGZIP(), []int{0} +} + +func (x *ContainerPath) GetContainerID() string { + if x != nil { + return x.ContainerID + } + return "" +} + +func (x *ContainerPath) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ContainerPath) GetNoWalk() bool { + if x != nil { + return x.NoWalk + } + return false +} + +func (x *ContainerPath) GetPreserveOwnership() bool { + if x != nil { + return x.PreserveOwnership + } + return false +} + +var File_types_transfer_container_proto protoreflect.FileDescriptor + +var file_types_transfer_container_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x19, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x0d, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x77, 0x61, 0x6c, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6e, 0x6f, 0x57, 0x61, 0x6c, 0x6b, 0x12, 0x2d, 0x0a, + 0x12, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x42, 0x35, 0x5a, 0x33, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_types_transfer_container_proto_rawDescOnce sync.Once + file_types_transfer_container_proto_rawDescData = file_types_transfer_container_proto_rawDesc +) + +func file_types_transfer_container_proto_rawDescGZIP() []byte { + file_types_transfer_container_proto_rawDescOnce.Do(func() { + file_types_transfer_container_proto_rawDescData = protoimpl.X.CompressGZIP(file_types_transfer_container_proto_rawDescData) + }) + return file_types_transfer_container_proto_rawDescData +} + +var file_types_transfer_container_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_types_transfer_container_proto_goTypes = []interface{}{ + (*ContainerPath)(nil), // 0: containerd.types.transfer.ContainerPath +} +var file_types_transfer_container_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_types_transfer_container_proto_init() } +func file_types_transfer_container_proto_init() { + if File_types_transfer_container_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_types_transfer_container_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_types_transfer_container_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_types_transfer_container_proto_goTypes, + DependencyIndexes: file_types_transfer_container_proto_depIdxs, + MessageInfos: file_types_transfer_container_proto_msgTypes, + }.Build() + File_types_transfer_container_proto = out.File + file_types_transfer_container_proto_rawDesc = nil + file_types_transfer_container_proto_goTypes = nil + file_types_transfer_container_proto_depIdxs = nil +} diff --git a/api/types/transfer/container.proto b/api/types/transfer/container.proto new file mode 100644 index 0000000000000..ca3f674fba836 --- /dev/null +++ b/api/types/transfer/container.proto @@ -0,0 +1,39 @@ +/* + 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 + + 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. +*/ +syntax = "proto3"; + + +package containerd.types.transfer; + +option go_package = "github.com/containerd/containerd/api/types/transfer"; + +// ContainerPath represents a path within an active container's +// filesystem. It acts as either a source or destination in a transfer +// operation, identifying the container and path for archive operations. +message ContainerPath { + string container_id = 1; + string path = 2; + + // When true and path is a directory, return only the directory entry + // itself without walking into its contents. This is useful for + // stat-like operations where only the directory's metadata is needed. + bool no_walk = 3; + + // When true, preserve the UID/GID from tar headers when extracting + // files. When false, extracted files are owned by the extracting + // process. + bool preserve_ownership = 4; +} diff --git a/api/types/transfer/streaming.pb.go b/api/types/transfer/streaming.pb.go index 3387e3174f434..9b7415281704c 100644 --- a/api/types/transfer/streaming.pb.go +++ b/api/types/transfer/streaming.pb.go @@ -129,6 +129,122 @@ func (x *WindowUpdate) GetUpdate() int32 { return 0 } +// ReadStream carries data from the client to the server (import +// direction). The client sends data through the stream and the +// server reads it. +type ReadStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` +} + +func (x *ReadStream) Reset() { + *x = ReadStream{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_streaming_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStream) ProtoMessage() {} + +func (x *ReadStream) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_streaming_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadStream.ProtoReflect.Descriptor instead. +func (*ReadStream) Descriptor() ([]byte, []int) { + return file_types_transfer_streaming_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadStream) GetStream() string { + if x != nil { + return x.Stream + } + return "" +} + +func (x *ReadStream) GetMediaType() string { + if x != nil { + return x.MediaType + } + return "" +} + +// WriteStream carries data from the server to the client (export +// direction). The server writes data into the stream and the +// client receives it. +type WriteStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` +} + +func (x *WriteStream) Reset() { + *x = WriteStream{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_streaming_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteStream) ProtoMessage() {} + +func (x *WriteStream) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_streaming_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteStream.ProtoReflect.Descriptor instead. +func (*WriteStream) Descriptor() ([]byte, []int) { + return file_types_transfer_streaming_proto_rawDescGZIP(), []int{3} +} + +func (x *WriteStream) GetStream() string { + if x != nil { + return x.Stream + } + return "" +} + +func (x *WriteStream) GetMediaType() string { + if x != nil { + return x.MediaType + } + return "" +} + var File_types_transfer_streaming_proto protoreflect.FileDescriptor var file_types_transfer_streaming_proto_rawDesc = []byte{ @@ -139,11 +255,20 @@ var file_types_transfer_streaming_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x0c, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, + 0x43, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x44, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -158,10 +283,12 @@ func file_types_transfer_streaming_proto_rawDescGZIP() []byte { return file_types_transfer_streaming_proto_rawDescData } -var file_types_transfer_streaming_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_types_transfer_streaming_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_types_transfer_streaming_proto_goTypes = []interface{}{ (*Data)(nil), // 0: containerd.types.transfer.Data (*WindowUpdate)(nil), // 1: containerd.types.transfer.WindowUpdate + (*ReadStream)(nil), // 2: containerd.types.transfer.ReadStream + (*WriteStream)(nil), // 3: containerd.types.transfer.WriteStream } var file_types_transfer_streaming_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -201,6 +328,30 @@ func file_types_transfer_streaming_proto_init() { return nil } } + file_types_transfer_streaming_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_transfer_streaming_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -208,7 +359,7 @@ func file_types_transfer_streaming_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_types_transfer_streaming_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/api/types/transfer/streaming.proto b/api/types/transfer/streaming.proto index e01e70360d8af..24d144cc6ac94 100644 --- a/api/types/transfer/streaming.proto +++ b/api/types/transfer/streaming.proto @@ -27,3 +27,19 @@ message Data { message WindowUpdate { int32 update = 1; } + +// ReadStream carries data from the client to the server (import +// direction). The client sends data through the stream and the +// server reads it. +message ReadStream { + string stream = 1; + string media_type = 2; +} + +// WriteStream carries data from the server to the client (export +// direction). The server writes data into the stream and the +// client receives it. +message WriteStream { + string stream = 1; + string media_type = 2; +} diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/container.pb.go b/vendor/github.com/containerd/containerd/api/types/transfer/container.pb.go new file mode 100644 index 0000000000000..ec4cccbfd5401 --- /dev/null +++ b/vendor/github.com/containerd/containerd/api/types/transfer/container.pb.go @@ -0,0 +1,201 @@ +// +//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 +// +//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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: types/transfer/container.proto + +package transfer + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ContainerPath represents a path within an active container's +// filesystem. It acts as either a source or destination in a transfer +// operation, identifying the container and path for archive operations. +type ContainerPath struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // When true and path is a directory, return only the directory entry + // itself without walking into its contents. This is useful for + // stat-like operations where only the directory's metadata is needed. + NoWalk bool `protobuf:"varint,3,opt,name=no_walk,json=noWalk,proto3" json:"no_walk,omitempty"` + // When true, preserve the UID/GID from tar headers when extracting + // files. When false, extracted files are owned by the extracting + // process. + PreserveOwnership bool `protobuf:"varint,4,opt,name=preserve_ownership,json=preserveOwnership,proto3" json:"preserve_ownership,omitempty"` +} + +func (x *ContainerPath) Reset() { + *x = ContainerPath{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_container_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerPath) ProtoMessage() {} + +func (x *ContainerPath) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_container_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerPath.ProtoReflect.Descriptor instead. +func (*ContainerPath) Descriptor() ([]byte, []int) { + return file_types_transfer_container_proto_rawDescGZIP(), []int{0} +} + +func (x *ContainerPath) GetContainerID() string { + if x != nil { + return x.ContainerID + } + return "" +} + +func (x *ContainerPath) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *ContainerPath) GetNoWalk() bool { + if x != nil { + return x.NoWalk + } + return false +} + +func (x *ContainerPath) GetPreserveOwnership() bool { + if x != nil { + return x.PreserveOwnership + } + return false +} + +var File_types_transfer_container_proto protoreflect.FileDescriptor + +var file_types_transfer_container_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x19, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x22, 0x8e, 0x01, 0x0a, 0x0d, + 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x61, 0x74, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x77, 0x61, 0x6c, 0x6b, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6e, 0x6f, 0x57, 0x61, 0x6c, 0x6b, 0x12, 0x2d, 0x0a, + 0x12, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x68, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x70, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x42, 0x35, 0x5a, 0x33, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_types_transfer_container_proto_rawDescOnce sync.Once + file_types_transfer_container_proto_rawDescData = file_types_transfer_container_proto_rawDesc +) + +func file_types_transfer_container_proto_rawDescGZIP() []byte { + file_types_transfer_container_proto_rawDescOnce.Do(func() { + file_types_transfer_container_proto_rawDescData = protoimpl.X.CompressGZIP(file_types_transfer_container_proto_rawDescData) + }) + return file_types_transfer_container_proto_rawDescData +} + +var file_types_transfer_container_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_types_transfer_container_proto_goTypes = []interface{}{ + (*ContainerPath)(nil), // 0: containerd.types.transfer.ContainerPath +} +var file_types_transfer_container_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_types_transfer_container_proto_init() } +func file_types_transfer_container_proto_init() { + if File_types_transfer_container_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_types_transfer_container_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerPath); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_types_transfer_container_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_types_transfer_container_proto_goTypes, + DependencyIndexes: file_types_transfer_container_proto_depIdxs, + MessageInfos: file_types_transfer_container_proto_msgTypes, + }.Build() + File_types_transfer_container_proto = out.File + file_types_transfer_container_proto_rawDesc = nil + file_types_transfer_container_proto_goTypes = nil + file_types_transfer_container_proto_depIdxs = nil +} diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/container.proto b/vendor/github.com/containerd/containerd/api/types/transfer/container.proto new file mode 100644 index 0000000000000..ca3f674fba836 --- /dev/null +++ b/vendor/github.com/containerd/containerd/api/types/transfer/container.proto @@ -0,0 +1,39 @@ +/* + 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 + + 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. +*/ +syntax = "proto3"; + + +package containerd.types.transfer; + +option go_package = "github.com/containerd/containerd/api/types/transfer"; + +// ContainerPath represents a path within an active container's +// filesystem. It acts as either a source or destination in a transfer +// operation, identifying the container and path for archive operations. +message ContainerPath { + string container_id = 1; + string path = 2; + + // When true and path is a directory, return only the directory entry + // itself without walking into its contents. This is useful for + // stat-like operations where only the directory's metadata is needed. + bool no_walk = 3; + + // When true, preserve the UID/GID from tar headers when extracting + // files. When false, extracted files are owned by the extracting + // process. + bool preserve_ownership = 4; +} diff --git a/vendor/github.com/containerd/containerd/api/types/transfer/streaming.pb.go b/vendor/github.com/containerd/containerd/api/types/transfer/streaming.pb.go index 3387e3174f434..9b7415281704c 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/streaming.pb.go +++ b/vendor/github.com/containerd/containerd/api/types/transfer/streaming.pb.go @@ -129,6 +129,122 @@ func (x *WindowUpdate) GetUpdate() int32 { return 0 } +// ReadStream carries data from the client to the server (import +// direction). The client sends data through the stream and the +// server reads it. +type ReadStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` +} + +func (x *ReadStream) Reset() { + *x = ReadStream{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_streaming_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ReadStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStream) ProtoMessage() {} + +func (x *ReadStream) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_streaming_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadStream.ProtoReflect.Descriptor instead. +func (*ReadStream) Descriptor() ([]byte, []int) { + return file_types_transfer_streaming_proto_rawDescGZIP(), []int{2} +} + +func (x *ReadStream) GetStream() string { + if x != nil { + return x.Stream + } + return "" +} + +func (x *ReadStream) GetMediaType() string { + if x != nil { + return x.MediaType + } + return "" +} + +// WriteStream carries data from the server to the client (export +// direction). The server writes data into the stream and the +// client receives it. +type WriteStream struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Stream string `protobuf:"bytes,1,opt,name=stream,proto3" json:"stream,omitempty"` + MediaType string `protobuf:"bytes,2,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` +} + +func (x *WriteStream) Reset() { + *x = WriteStream{} + if protoimpl.UnsafeEnabled { + mi := &file_types_transfer_streaming_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteStream) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteStream) ProtoMessage() {} + +func (x *WriteStream) ProtoReflect() protoreflect.Message { + mi := &file_types_transfer_streaming_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteStream.ProtoReflect.Descriptor instead. +func (*WriteStream) Descriptor() ([]byte, []int) { + return file_types_transfer_streaming_proto_rawDescGZIP(), []int{3} +} + +func (x *WriteStream) GetStream() string { + if x != nil { + return x.Stream + } + return "" +} + +func (x *WriteStream) GetMediaType() string { + if x != nil { + return x.MediaType + } + return "" +} + var File_types_transfer_streaming_proto protoreflect.FileDescriptor var file_types_transfer_streaming_proto_rawDesc = []byte{ @@ -139,11 +255,20 @@ var file_types_transfer_streaming_proto_rawDesc = []byte{ 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x0c, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, + 0x43, 0x0a, 0x0a, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x44, 0x0a, 0x0b, 0x57, 0x72, 0x69, 0x74, 0x65, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -158,10 +283,12 @@ func file_types_transfer_streaming_proto_rawDescGZIP() []byte { return file_types_transfer_streaming_proto_rawDescData } -var file_types_transfer_streaming_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_types_transfer_streaming_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_types_transfer_streaming_proto_goTypes = []interface{}{ (*Data)(nil), // 0: containerd.types.transfer.Data (*WindowUpdate)(nil), // 1: containerd.types.transfer.WindowUpdate + (*ReadStream)(nil), // 2: containerd.types.transfer.ReadStream + (*WriteStream)(nil), // 3: containerd.types.transfer.WriteStream } var file_types_transfer_streaming_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -201,6 +328,30 @@ func file_types_transfer_streaming_proto_init() { return nil } } + file_types_transfer_streaming_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_transfer_streaming_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteStream); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -208,7 +359,7 @@ func file_types_transfer_streaming_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_types_transfer_streaming_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, 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 e01e70360d8af..24d144cc6ac94 100644 --- a/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto +++ b/vendor/github.com/containerd/containerd/api/types/transfer/streaming.proto @@ -27,3 +27,19 @@ message Data { message WindowUpdate { int32 update = 1; } + +// ReadStream carries data from the client to the server (import +// direction). The client sends data through the stream and the +// server reads it. +message ReadStream { + string stream = 1; + string media_type = 2; +} + +// WriteStream carries data from the server to the client (export +// direction). The server writes data into the stream and the +// client receives it. +message WriteStream { + string stream = 1; + string media_type = 2; +}