From 94eafaab60d93766509a4b35e4241e7fff5a1d5d Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 20 Jun 2017 17:47:59 -0700 Subject: [PATCH] Update GRPC for consistency Signed-off-by: Michael Crosby --- api/services/containers/containers.pb.go | 531 +++++-- api/services/containers/containers.proto | 21 +- api/services/content/content.pb.go | 585 ++++---- api/services/content/content.proto | 30 +- api/services/diff/diff.pb.go | 73 +- api/services/diff/diff.proto | 2 +- api/services/events/events.pb.go | 81 +- api/services/events/events.proto | 6 +- api/services/execution/execution.pb.go | 1607 ++++++++++------------ api/services/execution/execution.proto | 121 +- api/services/images/images.pb.go | 647 ++++++--- api/services/images/images.proto | 49 +- api/services/namespaces/namespace.pb.go | 111 +- api/services/namespaces/namespace.proto | 4 +- api/services/shim/shim.pb.go | 596 ++++---- api/services/shim/shim.proto | 11 +- api/services/snapshot/snapshots.pb.go | 964 +++++++++---- api/services/snapshot/snapshots.proto | 47 +- api/services/version/version.pb.go | 32 +- api/services/version/version.proto | 2 +- api/types/event/container.pb.go | 363 ++++- api/types/event/container.proto | 6 +- api/types/event/image.pb.go | 191 ++- api/types/event/image.proto | 4 +- client.go | 14 +- client_test.go | 3 +- cmd/containerd/main.go | 2 +- cmd/ctr/events.go | 6 +- cmd/ctr/utils.go | 18 +- cmd/dist/rootfs.go | 1 - container.go | 6 +- container_test.go | 6 +- container_unix.go | 2 +- containers/containers.go | 27 +- events/convert.go | 4 +- images/image.go | 2 +- linux/shim/init.go | 25 +- linux/task.go | 21 +- metadata/containers.go | 10 +- metadata/images.go | 2 +- plugin/container.go | 12 +- process.go | 34 +- services/containers/helpers.go | 26 +- services/containers/service.go | 5 +- services/content/reader.go | 6 +- services/content/service.go | 16 +- services/content/store.go | 8 +- services/content/writer.go | 8 +- services/events/service.go | 2 +- services/execution/collector.go | 89 -- services/execution/service.go | 117 +- services/images/client.go | 10 +- services/images/service.go | 29 +- services/snapshot/client.go | 29 +- services/snapshot/service.go | 42 +- task.go | 77 +- 56 files changed, 3941 insertions(+), 2802 deletions(-) delete mode 100644 services/execution/collector.go diff --git a/api/services/containers/containers.pb.go b/api/services/containers/containers.pb.go index 544cdbc6f..84fb05a56 100644 --- a/api/services/containers/containers.pb.go +++ b/api/services/containers/containers.pb.go @@ -75,9 +75,9 @@ type Container struct { // If this field is updated, the spec and rootfs needed to updated, as well. Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // Runtime specifies which runtime to use for executing this container. - Runtime string `protobuf:"bytes,4,opt,name=runtime,proto3" json:"runtime,omitempty"` + Runtime *Container_Runtime `protobuf:"bytes,4,opt,name=runtime" json:"runtime,omitempty"` // Spec to be used when creating the container. This is runtime specific. - Spec *google_protobuf1.Any `protobuf:"bytes,6,opt,name=spec" json:"spec,omitempty"` + Spec *google_protobuf1.Any `protobuf:"bytes,5,opt,name=spec" json:"spec,omitempty"` // RootFS 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 @@ -86,15 +86,28 @@ type Container struct { // Snapshots referenced in this field will not be garbage collected. // // This field may be updated. - RootFS string `protobuf:"bytes,7,opt,name=rootfs,proto3" json:"rootfs,omitempty"` - CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` - UpdatedAt time.Time `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` + RootFS string `protobuf:"bytes,6,opt,name=rootfs,proto3" json:"rootfs,omitempty"` + // CreatedAt is the time the container was first created. + CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,stdtime" json:"created_at"` + // UpdatedAt is the last time the container was mutated. + UpdatedAt time.Time `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"` } func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0} } +type Container_Runtime struct { + // Name is the name of the runtime. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Options specify additional runtime initialization options. + Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Container_Runtime) Reset() { *m = Container_Runtime{} } +func (*Container_Runtime) ProtoMessage() {} +func (*Container_Runtime) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0, 1} } + type GetContainerRequest struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -183,16 +196,17 @@ func (*DeleteContainerRequest) ProtoMessage() {} func (*DeleteContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{9} } func init() { - proto.RegisterType((*Container)(nil), "containerd.v1.Container") - proto.RegisterType((*GetContainerRequest)(nil), "containerd.v1.GetContainerRequest") - proto.RegisterType((*GetContainerResponse)(nil), "containerd.v1.GetContainerResponse") - proto.RegisterType((*ListContainersRequest)(nil), "containerd.v1.ListContainersRequest") - proto.RegisterType((*ListContainersResponse)(nil), "containerd.v1.ListContainersResponse") - proto.RegisterType((*CreateContainerRequest)(nil), "containerd.v1.CreateContainerRequest") - proto.RegisterType((*CreateContainerResponse)(nil), "containerd.v1.CreateContainerResponse") - proto.RegisterType((*UpdateContainerRequest)(nil), "containerd.v1.UpdateContainerRequest") - proto.RegisterType((*UpdateContainerResponse)(nil), "containerd.v1.UpdateContainerResponse") - proto.RegisterType((*DeleteContainerRequest)(nil), "containerd.v1.DeleteContainerRequest") + proto.RegisterType((*Container)(nil), "containerd.services.containers.v1.Container") + proto.RegisterType((*Container_Runtime)(nil), "containerd.services.containers.v1.Container.Runtime") + proto.RegisterType((*GetContainerRequest)(nil), "containerd.services.containers.v1.GetContainerRequest") + proto.RegisterType((*GetContainerResponse)(nil), "containerd.services.containers.v1.GetContainerResponse") + proto.RegisterType((*ListContainersRequest)(nil), "containerd.services.containers.v1.ListContainersRequest") + proto.RegisterType((*ListContainersResponse)(nil), "containerd.services.containers.v1.ListContainersResponse") + proto.RegisterType((*CreateContainerRequest)(nil), "containerd.services.containers.v1.CreateContainerRequest") + proto.RegisterType((*CreateContainerResponse)(nil), "containerd.services.containers.v1.CreateContainerResponse") + proto.RegisterType((*UpdateContainerRequest)(nil), "containerd.services.containers.v1.UpdateContainerRequest") + proto.RegisterType((*UpdateContainerResponse)(nil), "containerd.services.containers.v1.UpdateContainerResponse") + proto.RegisterType((*DeleteContainerRequest)(nil), "containerd.services.containers.v1.DeleteContainerRequest") } // Reference imports to suppress errors if they are not otherwise used. @@ -223,7 +237,7 @@ func NewContainersClient(cc *grpc.ClientConn) ContainersClient { func (c *containersClient) Get(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) { out := new(GetContainerResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Containers/Get", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Get", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -232,7 +246,7 @@ func (c *containersClient) Get(ctx context.Context, in *GetContainerRequest, opt func (c *containersClient) List(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) { out := new(ListContainersResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Containers/List", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/List", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -241,7 +255,7 @@ func (c *containersClient) List(ctx context.Context, in *ListContainersRequest, func (c *containersClient) Create(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) { out := new(CreateContainerResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Containers/Create", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Create", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -250,7 +264,7 @@ func (c *containersClient) Create(ctx context.Context, in *CreateContainerReques func (c *containersClient) Update(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) { out := new(UpdateContainerResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Containers/Update", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Update", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -259,7 +273,7 @@ func (c *containersClient) Update(ctx context.Context, in *UpdateContainerReques func (c *containersClient) Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.Containers/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -290,7 +304,7 @@ func _Containers_Get_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Containers/Get", + FullMethod: "/containerd.services.containers.v1.Containers/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Get(ctx, req.(*GetContainerRequest)) @@ -308,7 +322,7 @@ func _Containers_List_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Containers/List", + FullMethod: "/containerd.services.containers.v1.Containers/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).List(ctx, req.(*ListContainersRequest)) @@ -326,7 +340,7 @@ func _Containers_Create_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Containers/Create", + FullMethod: "/containerd.services.containers.v1.Containers/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Create(ctx, req.(*CreateContainerRequest)) @@ -344,7 +358,7 @@ func _Containers_Update_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Containers/Update", + FullMethod: "/containerd.services.containers.v1.Containers/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Update(ctx, req.(*UpdateContainerRequest)) @@ -362,7 +376,7 @@ func _Containers_Delete_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Containers/Delete", + FullMethod: "/containerd.services.containers.v1.Containers/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContainersServer).Delete(ctx, req.(*DeleteContainerRequest)) @@ -371,7 +385,7 @@ func _Containers_Delete_Handler(srv interface{}, ctx context.Context, dec func(i } var _Containers_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.Containers", + ServiceName: "containerd.services.containers.v1.Containers", HandlerType: (*ContainersServer)(nil), Methods: []grpc.MethodDesc{ { @@ -443,44 +457,89 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintContainers(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } - if len(m.Runtime) > 0 { + if m.Runtime != nil { dAtA[i] = 0x22 i++ - i = encodeVarintContainers(dAtA, i, uint64(len(m.Runtime))) - i += copy(dAtA[i:], m.Runtime) - } - if m.Spec != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintContainers(dAtA, i, uint64(m.Spec.Size())) - n1, err := m.Spec.MarshalTo(dAtA[i:]) + i = encodeVarintContainers(dAtA, i, uint64(m.Runtime.Size())) + n1, err := m.Runtime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } i += n1 } + if m.Spec != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintContainers(dAtA, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } if len(m.RootFS) > 0 { - dAtA[i] = 0x3a + dAtA[i] = 0x32 i++ i = encodeVarintContainers(dAtA, i, uint64(len(m.RootFS))) i += copy(dAtA[i:], m.RootFS) } - dAtA[i] = 0x42 + dAtA[i] = 0x3a i++ i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt))) - n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - dAtA[i] = 0x4a - i++ - i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) - n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) + n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:]) if err != nil { return 0, err } i += n3 + dAtA[i] = 0x42 + i++ + i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt))) + n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + +func (m *Container_Runtime) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Container_Runtime) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintContainers(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Options) > 0 { + for k, _ := range m.Options { + dAtA[i] = 0x12 + i++ + v := m.Options[k] + mapSize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + len(v) + sovContainers(uint64(len(v))) + i = encodeVarintContainers(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintContainers(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintContainers(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } return i, nil } @@ -526,11 +585,11 @@ func (m *GetContainerResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n4, err := m.Container.MarshalTo(dAtA[i:]) + n5, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n5 return i, nil } @@ -606,11 +665,11 @@ func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n5, err := m.Container.MarshalTo(dAtA[i:]) + n6, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n6 return i, nil } @@ -632,11 +691,11 @@ func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n6, err := m.Container.MarshalTo(dAtA[i:]) + n7, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n7 return i, nil } @@ -658,20 +717,20 @@ func (m *UpdateContainerRequest) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n7, err := m.Container.MarshalTo(dAtA[i:]) + n8, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n8 if m.UpdateMask != nil { dAtA[i] = 0x12 i++ i = encodeVarintContainers(dAtA, i, uint64(m.UpdateMask.Size())) - n8, err := m.UpdateMask.MarshalTo(dAtA[i:]) + n9, err := m.UpdateMask.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 } return i, nil } @@ -694,11 +753,11 @@ func (m *UpdateContainerResponse) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintContainers(dAtA, i, uint64(m.Container.Size())) - n9, err := m.Container.MarshalTo(dAtA[i:]) + n10, err := m.Container.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n10 return i, nil } @@ -772,8 +831,8 @@ func (m *Container) Size() (n int) { if l > 0 { n += 1 + l + sovContainers(uint64(l)) } - l = len(m.Runtime) - if l > 0 { + if m.Runtime != nil { + l = m.Runtime.Size() n += 1 + l + sovContainers(uint64(l)) } if m.Spec != nil { @@ -791,6 +850,24 @@ func (m *Container) Size() (n int) { return n } +func (m *Container_Runtime) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovContainers(uint64(l)) + } + if len(m.Options) > 0 { + for k, v := range m.Options { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovContainers(uint64(len(k))) + 1 + len(v) + sovContainers(uint64(len(v))) + n += mapEntrySize + 1 + sovContainers(uint64(mapEntrySize)) + } + } + return n +} + func (m *GetContainerRequest) Size() (n int) { var l int _ = l @@ -908,7 +985,7 @@ func (this *Container) String() string { `ID:` + fmt.Sprintf("%v", this.ID) + `,`, `Labels:` + mapStringForLabels + `,`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, - `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`, + `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "Container_Runtime", "Container_Runtime", 1) + `,`, `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`, `RootFS:` + fmt.Sprintf("%v", this.RootFS) + `,`, `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf4.Timestamp", 1), `&`, ``, 1) + `,`, @@ -917,6 +994,27 @@ func (this *Container) String() string { }, "") return s } +func (this *Container_Runtime) String() string { + if this == nil { + return "nil" + } + keysForOptions := make([]string, 0, len(this.Options)) + for k, _ := range this.Options { + keysForOptions = append(keysForOptions, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + mapStringForOptions := "map[string]string{" + for _, k := range keysForOptions { + mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) + } + mapStringForOptions += "}" + s := strings.Join([]string{`&Container_Runtime{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Options:` + mapStringForOptions + `,`, + `}`, + }, "") + return s +} func (this *GetContainerRequest) String() string { if this == nil { return "nil" @@ -1223,7 +1321,7 @@ func (m *Container) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowContainers @@ -1233,22 +1331,26 @@ func (m *Container) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthContainers } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Runtime = string(dAtA[iNdEx:postIndex]) + if m.Runtime == nil { + m.Runtime = &Container_Runtime{} + } + if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } @@ -1281,7 +1383,7 @@ func (m *Container) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RootFS", wireType) } @@ -1310,7 +1412,7 @@ func (m *Container) Unmarshal(dAtA []byte) error { } m.RootFS = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } @@ -1340,7 +1442,7 @@ func (m *Container) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } @@ -1391,6 +1493,201 @@ func (m *Container) Unmarshal(dAtA []byte) error { } return nil } +func (m *Container_Runtime) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Runtime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Runtime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthContainers + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthContainers + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthContainers + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Options == nil { + m.Options = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthContainers + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Options[mapkey] = mapvalue + } else { + var mapvalue string + m.Options[mapkey] = mapvalue + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipContainers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthContainers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GetContainerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2252,48 +2549,52 @@ func init() { } var fileDescriptorContainers = []byte{ - // 680 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x93, 0xe0, 0x36, 0x13, 0x21, 0xa1, 0x25, 0x04, 0x63, 0xa4, 0x24, 0x32, 0x3f, 0xca, - 0x05, 0x1b, 0xc2, 0x85, 0x9f, 0x0a, 0xa9, 0xe9, 0x9f, 0x2a, 0x15, 0x0e, 0x6e, 0xa1, 0xdc, 0x2a, - 0x27, 0xde, 0x04, 0xab, 0x8e, 0xd7, 0x78, 0x37, 0x95, 0x72, 0xe3, 0x11, 0x90, 0x78, 0x05, 0x8e, - 0x3c, 0x48, 0x8f, 0x1c, 0x39, 0x15, 0x9a, 0x27, 0x41, 0xbb, 0x5e, 0xd7, 0xa9, 0xed, 0x50, 0x10, - 0xbd, 0xcd, 0x78, 0xbe, 0xf9, 0x32, 0xf3, 0xcd, 0x67, 0x07, 0x76, 0x46, 0x1e, 0xfb, 0x30, 0xe9, - 0x9b, 0x03, 0x32, 0xb6, 0x06, 0x24, 0x60, 0x8e, 0x17, 0xe0, 0xc8, 0x9d, 0x0f, 0x9d, 0xd0, 0xb3, - 0x28, 0x8e, 0x8e, 0xbd, 0x01, 0xa6, 0xe9, 0xf3, 0xf9, 0xd0, 0x0c, 0x23, 0xc2, 0x08, 0xba, 0x9e, - 0x36, 0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xeb, 0x02, 0x8d, 0x07, 0x00, 0x00, + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xda, 0x4a, + 0x14, 0x8e, 0x81, 0x98, 0x70, 0xb8, 0x8b, 0xab, 0xb9, 0x5c, 0xae, 0xaf, 0x2b, 0x01, 0x65, 0xc5, + 0xa2, 0x35, 0x2d, 0xad, 0xda, 0x24, 0x5d, 0x41, 0xfe, 0x14, 0x29, 0x6d, 0xa3, 0x69, 0xbb, 0xca, + 0x22, 0x32, 0x30, 0x10, 0x17, 0xe3, 0x71, 0x3d, 0x03, 0x12, 0xea, 0xa2, 0x7d, 0x84, 0xbe, 0x45, + 0xde, 0xa0, 0xcf, 0x90, 0x65, 0x97, 0x5d, 0xa5, 0x09, 0x4f, 0x52, 0x79, 0x3c, 0x8e, 0x29, 0x38, + 0xaa, 0x41, 0xcd, 0xee, 0x4c, 0xe6, 0x7c, 0xdf, 0xf9, 0xe6, 0x3b, 0xe7, 0x38, 0xc0, 0x61, 0xdf, + 0xe2, 0x67, 0xa3, 0xb6, 0xd1, 0xa1, 0xc3, 0x7a, 0x87, 0x3a, 0xdc, 0xb4, 0x1c, 0xe2, 0x75, 0x67, + 0x43, 0xd3, 0xb5, 0xea, 0x8c, 0x78, 0x63, 0xab, 0x43, 0x58, 0xf4, 0xf7, 0xd9, 0xd0, 0x70, 0x3d, + 0xca, 0x29, 0xba, 0x1f, 0x81, 0x8c, 0x10, 0x60, 0xcc, 0x64, 0x8d, 0x1f, 0xeb, 0x85, 0x3e, 0xed, + 0x53, 0x91, 0x5d, 0xf7, 0xa3, 0x00, 0xa8, 0xff, 0xdf, 0xa7, 0xb4, 0x6f, 0x93, 0xba, 0x38, 0xb5, + 0x47, 0xbd, 0xba, 0xe9, 0x4c, 0xe4, 0xd5, 0xbd, 0xf9, 0x2b, 0x32, 0x74, 0x79, 0x78, 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 0x6d, 0x5a, 0x52, 0xae, 0xa6, 0x25, 0xa5, 0xad, 0x8a, 0xcc, 0x27, 0x3f, 0x03, 0x00, 0x00, 0xff, + 0xff, 0xcd, 0xae, 0xd0, 0xb5, 0xd0, 0x09, 0x00, 0x00, } diff --git a/api/services/containers/containers.proto b/api/services/containers/containers.proto index 445ebdea2..0af83df9e 100644 --- a/api/services/containers/containers.proto +++ b/api/services/containers/containers.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1; +package containerd.services.containers.v1; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; @@ -51,11 +51,17 @@ message 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. + map options = 2; + } // Runtime specifies which runtime to use for executing this container. - string runtime = 4; + Runtime runtime = 4; // Spec to be used when creating the container. This is runtime specific. - google.protobuf.Any spec = 6; + google.protobuf.Any spec = 5; // RootFS specifies the snapshot key to use for the container's root // filesystem. When starting a task from this container, a caller should @@ -65,10 +71,13 @@ message Container { // Snapshots referenced in this field will not be garbage collected. // // This field may be updated. - string rootfs = 7 [(gogoproto.customname) = "RootFS"]; + string rootfs = 6 [(gogoproto.customname) = "RootFS"]; - google.protobuf.Timestamp created_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Timestamp updated_at = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // CreatedAt is the time the container was first created. + google.protobuf.Timestamp created_at = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + // UpdatedAt is the last time the container was mutated. + google.protobuf.Timestamp updated_at = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; } message GetContainerRequest { diff --git a/api/services/content/content.pb.go b/api/services/content/content.pb.go index 9300eea94..32c55e3cb 100644 --- a/api/services/content/content.pb.go +++ b/api/services/content/content.pb.go @@ -15,13 +15,13 @@ ListContentRequest ListContentResponse DeleteContentRequest - ReadRequest - ReadResponse - StatusRequest + ReadContentRequest + ReadContentResponse Status + StatusRequest StatusResponse - WriteRequest - WriteResponse + WriteContentRequest + WriteContentResponse AbortRequest */ package content @@ -153,9 +153,9 @@ func (m *DeleteContentRequest) Reset() { *m = DeleteContentRe func (*DeleteContentRequest) ProtoMessage() {} func (*DeleteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{5} } -// ReadRequest defines the fields that make up a request to read a portion of +// ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. -type ReadRequest struct { +type ReadContentRequest struct { // Digest is the hash identity to read. Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` // Offset specifies the number of bytes from the start at which to begin @@ -167,27 +167,19 @@ type ReadRequest struct { Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` } -func (m *ReadRequest) Reset() { *m = ReadRequest{} } -func (*ReadRequest) ProtoMessage() {} -func (*ReadRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{6} } +func (m *ReadContentRequest) Reset() { *m = ReadContentRequest{} } +func (*ReadContentRequest) ProtoMessage() {} +func (*ReadContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{6} } -// ReadResponse carries byte data for a read request. -type ReadResponse struct { +// ReadContentResponse carries byte data for a read request. +type ReadContentResponse struct { Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } -func (m *ReadResponse) Reset() { *m = ReadResponse{} } -func (*ReadResponse) ProtoMessage() {} -func (*ReadResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{7} } - -type StatusRequest struct { - Regexp string `protobuf:"bytes,1,opt,name=regexp,proto3" json:"regexp,omitempty"` -} - -func (m *StatusRequest) Reset() { *m = StatusRequest{} } -func (*StatusRequest) ProtoMessage() {} -func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{8} } +func (m *ReadContentResponse) Reset() { *m = ReadContentResponse{} } +func (*ReadContentResponse) ProtoMessage() {} +func (*ReadContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{7} } type Status struct { StartedAt time.Time `protobuf:"bytes,1,opt,name=started_at,json=startedAt,stdtime" json:"started_at"` @@ -200,7 +192,15 @@ type Status struct { func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{9} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{8} } + +type StatusRequest struct { + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (m *StatusRequest) Reset() { *m = StatusRequest{} } +func (*StatusRequest) ProtoMessage() {} +func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{9} } type StatusResponse struct { Statuses []Status `protobuf:"bytes,1,rep,name=statuses" json:"statuses"` @@ -210,8 +210,8 @@ func (m *StatusResponse) Reset() { *m = StatusResponse{} } func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{10} } -// WriteRequest writes data to the request ref at offset. -type WriteRequest struct { +// WriteContentRequest writes data to the request ref at offset. +type WriteContentRequest struct { // Action sets the behavior of the write. // // When this is a write and the ref is not yet allocated, the ref will be @@ -223,7 +223,7 @@ type WriteRequest struct { // 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. - Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.v1.WriteAction" json:"action,omitempty"` + Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"` // Ref identifies the pre-commit object to write to. Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` // Total can be set to have the service validate the total size of the @@ -263,15 +263,15 @@ type WriteRequest struct { Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` } -func (m *WriteRequest) Reset() { *m = WriteRequest{} } -func (*WriteRequest) ProtoMessage() {} -func (*WriteRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{11} } +func (m *WriteContentRequest) Reset() { *m = WriteContentRequest{} } +func (*WriteContentRequest) ProtoMessage() {} +func (*WriteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{11} } -// WriteResponse is returned on the culmination of a write call. -type WriteResponse struct { +// WriteContentResponse is returned on the culmination of a write call. +type WriteContentResponse struct { // Action contains the action for the final message of the stream. A writer // should confirm that they match the intended result. - Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.v1.WriteAction" json:"action,omitempty"` + Action WriteAction `protobuf:"varint,1,opt,name=action,proto3,enum=containerd.services.content.v1.WriteAction" json:"action,omitempty"` // StartedAt provides the time at which the write began. // // This must be set for stat and commit write actions. All other write @@ -297,9 +297,9 @@ type WriteResponse struct { Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` } -func (m *WriteResponse) Reset() { *m = WriteResponse{} } -func (*WriteResponse) ProtoMessage() {} -func (*WriteResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{12} } +func (m *WriteContentResponse) Reset() { *m = WriteContentResponse{} } +func (*WriteContentResponse) ProtoMessage() {} +func (*WriteContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{12} } type AbortRequest struct { Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` @@ -310,21 +310,21 @@ func (*AbortRequest) ProtoMessage() {} func (*AbortRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{13} } func init() { - proto.RegisterType((*Info)(nil), "containerd.v1.Info") - proto.RegisterType((*InfoRequest)(nil), "containerd.v1.InfoRequest") - proto.RegisterType((*InfoResponse)(nil), "containerd.v1.InfoResponse") - proto.RegisterType((*ListContentRequest)(nil), "containerd.v1.ListContentRequest") - proto.RegisterType((*ListContentResponse)(nil), "containerd.v1.ListContentResponse") - proto.RegisterType((*DeleteContentRequest)(nil), "containerd.v1.DeleteContentRequest") - proto.RegisterType((*ReadRequest)(nil), "containerd.v1.ReadRequest") - proto.RegisterType((*ReadResponse)(nil), "containerd.v1.ReadResponse") - proto.RegisterType((*StatusRequest)(nil), "containerd.v1.StatusRequest") - proto.RegisterType((*Status)(nil), "containerd.v1.Status") - proto.RegisterType((*StatusResponse)(nil), "containerd.v1.StatusResponse") - proto.RegisterType((*WriteRequest)(nil), "containerd.v1.WriteRequest") - proto.RegisterType((*WriteResponse)(nil), "containerd.v1.WriteResponse") - proto.RegisterType((*AbortRequest)(nil), "containerd.v1.AbortRequest") - proto.RegisterEnum("containerd.v1.WriteAction", WriteAction_name, WriteAction_value) + proto.RegisterType((*Info)(nil), "containerd.services.content.v1.Info") + proto.RegisterType((*InfoRequest)(nil), "containerd.services.content.v1.InfoRequest") + proto.RegisterType((*InfoResponse)(nil), "containerd.services.content.v1.InfoResponse") + proto.RegisterType((*ListContentRequest)(nil), "containerd.services.content.v1.ListContentRequest") + proto.RegisterType((*ListContentResponse)(nil), "containerd.services.content.v1.ListContentResponse") + proto.RegisterType((*DeleteContentRequest)(nil), "containerd.services.content.v1.DeleteContentRequest") + proto.RegisterType((*ReadContentRequest)(nil), "containerd.services.content.v1.ReadContentRequest") + proto.RegisterType((*ReadContentResponse)(nil), "containerd.services.content.v1.ReadContentResponse") + proto.RegisterType((*Status)(nil), "containerd.services.content.v1.Status") + proto.RegisterType((*StatusRequest)(nil), "containerd.services.content.v1.StatusRequest") + proto.RegisterType((*StatusResponse)(nil), "containerd.services.content.v1.StatusResponse") + proto.RegisterType((*WriteContentRequest)(nil), "containerd.services.content.v1.WriteContentRequest") + proto.RegisterType((*WriteContentResponse)(nil), "containerd.services.content.v1.WriteContentResponse") + proto.RegisterType((*AbortRequest)(nil), "containerd.services.content.v1.AbortRequest") + proto.RegisterEnum("containerd.services.content.v1.WriteAction", WriteAction_name, WriteAction_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -355,7 +355,7 @@ type ContentClient interface { // 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. - Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Content_ReadClient, error) + Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error) // Status returns the status of ongoing object ingestions, started via // Write. // @@ -395,7 +395,7 @@ func NewContentClient(cc *grpc.ClientConn) ContentClient { func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { out := new(InfoResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Content/Info", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Info", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -403,7 +403,7 @@ func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc. } func (c *contentClient) List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[0], c.cc, "/containerd.v1.Content/List", opts...) + stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[0], c.cc, "/containerd.services.content.v1.Content/List", opts...) if err != nil { return nil, err } @@ -436,15 +436,15 @@ func (x *contentListClient) Recv() (*ListContentResponse, error) { func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.Content/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *contentClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (Content_ReadClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[1], c.cc, "/containerd.v1.Content/Read", opts...) +func (c *contentClient) Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[1], c.cc, "/containerd.services.content.v1.Content/Read", opts...) if err != nil { return nil, err } @@ -459,7 +459,7 @@ func (c *contentClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc. } type Content_ReadClient interface { - Recv() (*ReadResponse, error) + Recv() (*ReadContentResponse, error) grpc.ClientStream } @@ -467,8 +467,8 @@ type contentReadClient struct { grpc.ClientStream } -func (x *contentReadClient) Recv() (*ReadResponse, error) { - m := new(ReadResponse) +func (x *contentReadClient) Recv() (*ReadContentResponse, error) { + m := new(ReadContentResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -477,7 +477,7 @@ func (x *contentReadClient) Recv() (*ReadResponse, error) { func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { out := new(StatusResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Content/Status", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Status", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -485,7 +485,7 @@ func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...g } func (c *contentClient) Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[2], c.cc, "/containerd.v1.Content/Write", opts...) + stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[2], c.cc, "/containerd.services.content.v1.Content/Write", opts...) if err != nil { return nil, err } @@ -494,8 +494,8 @@ func (c *contentClient) Write(ctx context.Context, opts ...grpc.CallOption) (Con } type Content_WriteClient interface { - Send(*WriteRequest) error - Recv() (*WriteResponse, error) + Send(*WriteContentRequest) error + Recv() (*WriteContentResponse, error) grpc.ClientStream } @@ -503,12 +503,12 @@ type contentWriteClient struct { grpc.ClientStream } -func (x *contentWriteClient) Send(m *WriteRequest) error { +func (x *contentWriteClient) Send(m *WriteContentRequest) error { return x.ClientStream.SendMsg(m) } -func (x *contentWriteClient) Recv() (*WriteResponse, error) { - m := new(WriteResponse) +func (x *contentWriteClient) Recv() (*WriteContentResponse, error) { + m := new(WriteContentResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -517,7 +517,7 @@ func (x *contentWriteClient) Recv() (*WriteResponse, error) { func (c *contentClient) Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { out := new(google_protobuf2.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.Content/Abort", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Abort", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -544,7 +544,7 @@ type ContentServer interface { // 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. - Read(*ReadRequest, Content_ReadServer) error + Read(*ReadContentRequest, Content_ReadServer) error // Status returns the status of ongoing object ingestions, started via // Write. // @@ -588,7 +588,7 @@ func _Content_Info_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Content/Info", + FullMethod: "/containerd.services.content.v1.Content/Info", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Info(ctx, req.(*InfoRequest)) @@ -627,7 +627,7 @@ func _Content_Delete_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Content/Delete", + FullMethod: "/containerd.services.content.v1.Content/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Delete(ctx, req.(*DeleteContentRequest)) @@ -636,7 +636,7 @@ func _Content_Delete_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Content_Read_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ReadRequest) + m := new(ReadContentRequest) if err := stream.RecvMsg(m); err != nil { return err } @@ -644,7 +644,7 @@ func _Content_Read_Handler(srv interface{}, stream grpc.ServerStream) error { } type Content_ReadServer interface { - Send(*ReadResponse) error + Send(*ReadContentResponse) error grpc.ServerStream } @@ -652,7 +652,7 @@ type contentReadServer struct { grpc.ServerStream } -func (x *contentReadServer) Send(m *ReadResponse) error { +func (x *contentReadServer) Send(m *ReadContentResponse) error { return x.ServerStream.SendMsg(m) } @@ -666,7 +666,7 @@ func _Content_Status_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Content/Status", + FullMethod: "/containerd.services.content.v1.Content/Status", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Status(ctx, req.(*StatusRequest)) @@ -679,8 +679,8 @@ func _Content_Write_Handler(srv interface{}, stream grpc.ServerStream) error { } type Content_WriteServer interface { - Send(*WriteResponse) error - Recv() (*WriteRequest, error) + Send(*WriteContentResponse) error + Recv() (*WriteContentRequest, error) grpc.ServerStream } @@ -688,12 +688,12 @@ type contentWriteServer struct { grpc.ServerStream } -func (x *contentWriteServer) Send(m *WriteResponse) error { +func (x *contentWriteServer) Send(m *WriteContentResponse) error { return x.ServerStream.SendMsg(m) } -func (x *contentWriteServer) Recv() (*WriteRequest, error) { - m := new(WriteRequest) +func (x *contentWriteServer) Recv() (*WriteContentRequest, error) { + m := new(WriteContentRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } @@ -710,7 +710,7 @@ func _Content_Abort_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Content/Abort", + FullMethod: "/containerd.services.content.v1.Content/Abort", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ContentServer).Abort(ctx, req.(*AbortRequest)) @@ -719,7 +719,7 @@ func _Content_Abort_Handler(srv interface{}, ctx context.Context, dec func(inter } var _Content_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.Content", + ServiceName: "containerd.services.content.v1.Content", HandlerType: (*ContentServer)(nil), Methods: []grpc.MethodDesc{ { @@ -919,7 +919,7 @@ func (m *DeleteContentRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ReadRequest) Marshal() (dAtA []byte, err error) { +func (m *ReadContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -929,7 +929,7 @@ func (m *ReadRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ReadContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -953,7 +953,7 @@ func (m *ReadRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ReadResponse) Marshal() (dAtA []byte, err error) { +func (m *ReadContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -963,7 +963,7 @@ func (m *ReadResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ReadContentResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -982,30 +982,6 @@ func (m *ReadResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *StatusRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Regexp) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintContent(dAtA, i, uint64(len(m.Regexp))) - i += copy(dAtA[i:], m.Regexp) - } - return i, nil -} - func (m *Status) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1062,6 +1038,30 @@ func (m *Status) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *StatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Filter) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintContent(dAtA, i, uint64(len(m.Filter))) + i += copy(dAtA[i:], m.Filter) + } + return i, nil +} + func (m *StatusResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1092,7 +1092,7 @@ func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *WriteRequest) Marshal() (dAtA []byte, err error) { +func (m *WriteContentRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1102,7 +1102,7 @@ func (m *WriteRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *WriteContentRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1143,7 +1143,7 @@ func (m *WriteRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *WriteResponse) Marshal() (dAtA []byte, err error) { +func (m *WriteContentResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1153,7 +1153,7 @@ func (m *WriteResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *WriteResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *WriteContentResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1310,7 +1310,7 @@ func (m *DeleteContentRequest) Size() (n int) { return n } -func (m *ReadRequest) Size() (n int) { +func (m *ReadContentRequest) Size() (n int) { var l int _ = l l = len(m.Digest) @@ -1326,7 +1326,7 @@ func (m *ReadRequest) Size() (n int) { return n } -func (m *ReadResponse) Size() (n int) { +func (m *ReadContentResponse) Size() (n int) { var l int _ = l if m.Offset != 0 { @@ -1339,16 +1339,6 @@ func (m *ReadResponse) Size() (n int) { return n } -func (m *StatusRequest) Size() (n int) { - var l int - _ = l - l = len(m.Regexp) - if l > 0 { - n += 1 + l + sovContent(uint64(l)) - } - return n -} - func (m *Status) Size() (n int) { var l int _ = l @@ -1373,6 +1363,16 @@ func (m *Status) Size() (n int) { return n } +func (m *StatusRequest) Size() (n int) { + var l int + _ = l + l = len(m.Filter) + if l > 0 { + n += 1 + l + sovContent(uint64(l)) + } + return n +} + func (m *StatusResponse) Size() (n int) { var l int _ = l @@ -1385,7 +1385,7 @@ func (m *StatusResponse) Size() (n int) { return n } -func (m *WriteRequest) Size() (n int) { +func (m *WriteContentRequest) Size() (n int) { var l int _ = l if m.Action != 0 { @@ -1412,7 +1412,7 @@ func (m *WriteRequest) Size() (n int) { return n } -func (m *WriteResponse) Size() (n int) { +func (m *WriteContentResponse) Size() (n int) { var l int _ = l if m.Action != 0 { @@ -1519,11 +1519,11 @@ func (this *DeleteContentRequest) String() string { }, "") return s } -func (this *ReadRequest) String() string { +func (this *ReadContentRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ReadRequest{`, + s := strings.Join([]string{`&ReadContentRequest{`, `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, @@ -1531,27 +1531,17 @@ func (this *ReadRequest) String() string { }, "") return s } -func (this *ReadResponse) String() string { +func (this *ReadContentResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ReadResponse{`, + s := strings.Join([]string{`&ReadContentResponse{`, `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, `Data:` + fmt.Sprintf("%v", this.Data) + `,`, `}`, }, "") return s } -func (this *StatusRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StatusRequest{`, - `Regexp:` + fmt.Sprintf("%v", this.Regexp) + `,`, - `}`, - }, "") - return s -} func (this *Status) String() string { if this == nil { return "nil" @@ -1567,6 +1557,16 @@ func (this *Status) String() string { }, "") return s } +func (this *StatusRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StatusRequest{`, + `Filter:` + fmt.Sprintf("%v", this.Filter) + `,`, + `}`, + }, "") + return s +} func (this *StatusResponse) String() string { if this == nil { return "nil" @@ -1577,11 +1577,11 @@ func (this *StatusResponse) String() string { }, "") return s } -func (this *WriteRequest) String() string { +func (this *WriteContentRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&WriteRequest{`, + s := strings.Join([]string{`&WriteContentRequest{`, `Action:` + fmt.Sprintf("%v", this.Action) + `,`, `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, `Total:` + fmt.Sprintf("%v", this.Total) + `,`, @@ -1592,11 +1592,11 @@ func (this *WriteRequest) String() string { }, "") return s } -func (this *WriteResponse) String() string { +func (this *WriteContentResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&WriteResponse{`, + s := strings.Join([]string{`&WriteContentResponse{`, `Action:` + fmt.Sprintf("%v", this.Action) + `,`, `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`, `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`, @@ -2122,7 +2122,7 @@ func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReadRequest) Unmarshal(dAtA []byte) error { +func (m *ReadContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2145,10 +2145,10 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReadRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ReadContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReadRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ReadContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2239,7 +2239,7 @@ func (m *ReadRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReadResponse) Unmarshal(dAtA []byte) error { +func (m *ReadContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2262,10 +2262,10 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReadResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ReadContentResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReadResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ReadContentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2339,85 +2339,6 @@ func (m *ReadResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *StatusRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowContent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Regexp", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowContent - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthContent - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Regexp = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipContent(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthContent - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Status) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2624,6 +2545,85 @@ func (m *Status) Unmarshal(dAtA []byte) error { } return nil } +func (m *StatusRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthContent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipContent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthContent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *StatusResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2705,7 +2705,7 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *WriteRequest) Unmarshal(dAtA []byte) error { +func (m *WriteContentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2728,10 +2728,10 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: WriteRequest: wiretype end group for non-group") + return fmt.Errorf("proto: WriteContentRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: WriteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: WriteContentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2901,7 +2901,7 @@ func (m *WriteRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *WriteResponse) Unmarshal(dAtA []byte) error { +func (m *WriteContentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2924,10 +2924,10 @@ func (m *WriteResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: WriteResponse: wiretype end group for non-group") + return fmt.Errorf("proto: WriteContentResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: WriteResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: WriteContentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3286,59 +3286,60 @@ func init() { } var fileDescriptorContent = []byte{ - // 860 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xcf, 0xc4, 0x8e, 0x69, 0x5f, 0xd2, 0x25, 0x4c, 0xb2, 0x55, 0xe4, 0xee, 0x3a, 0x59, 0x73, - 0x20, 0x5a, 0x69, 0x9d, 0x25, 0x1c, 0x90, 0x10, 0x08, 0x25, 0x69, 0x41, 0x41, 0x2c, 0x2b, 0xb9, - 0x91, 0x2a, 0x4e, 0xc8, 0x49, 0x26, 0xc6, 0x52, 0xe3, 0x31, 0xf6, 0xa4, 0x2a, 0x9c, 0xb8, 0x20, - 0xa1, 0x9e, 0xf8, 0x02, 0xbd, 0x00, 0x77, 0xee, 0x7c, 0x01, 0x7a, 0xe4, 0x88, 0x38, 0x14, 0x9a, - 0x03, 0x1f, 0x80, 0x4f, 0x80, 0x3c, 0x33, 0x76, 0x9c, 0x3f, 0x45, 0xf4, 0x0f, 0xa7, 0xcc, 0xcc, - 0xfb, 0xbd, 0x9f, 0xdf, 0x9f, 0x5f, 0xdf, 0x2b, 0xf4, 0x5c, 0x8f, 0x7d, 0x3e, 0x1b, 0x5a, 0x23, - 0x3a, 0x6d, 0x8d, 0xa8, 0xcf, 0x1c, 0xcf, 0x27, 0xe1, 0x38, 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, 0xff, 0xff, 0xbc, 0x66, 0xb9, 0xa0, 0x05, 0x0a, 0x00, 0x00, + // 866 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x2a, 0x55, + 0x18, 0xe6, 0xc0, 0x30, 0xb6, 0x2f, 0x78, 0xc5, 0x03, 0x36, 0x64, 0x8c, 0x03, 0x4e, 0x8c, 0x92, + 0x7b, 0xbd, 0x43, 0xa5, 0x77, 0x6d, 0x02, 0xb4, 0xd1, 0x1a, 0x5b, 0x93, 0x29, 0xda, 0xe8, 0xc6, + 0x0c, 0x70, 0x18, 0x27, 0x81, 0x39, 0xd3, 0x99, 0x43, 0xa3, 0xae, 0xdc, 0x98, 0x98, 0xc6, 0x85, + 0x7f, 0xa0, 0x1b, 0x75, 0xef, 0xde, 0x5f, 0xd0, 0xa5, 0x4b, 0xd3, 0x45, 0x6b, 0xf9, 0x21, 0xc6, + 0xcc, 0x99, 0x33, 0xc3, 0x50, 0x5a, 0x81, 0x96, 0xbb, 0xe2, 0x7c, 0xbc, 0xcf, 0xf3, 0x7e, 0x3d, + 0x73, 0x5e, 0xa0, 0x6d, 0xd9, 0xec, 0x9b, 0x71, 0x57, 0xef, 0xd1, 0x51, 0xbd, 0x47, 0x1d, 0x66, + 0xda, 0x0e, 0xf1, 0xfa, 0xc9, 0xa5, 0xe9, 0xda, 0x75, 0x9f, 0x78, 0xa7, 0x76, 0x8f, 0xf8, 0xfc, + 0x9c, 0x38, 0x2c, 0xfa, 0xd5, 0x5d, 0x8f, 0x32, 0x8a, 0xd5, 0xa9, 0xb9, 0x1e, 0x99, 0xea, 0x91, + 0xc9, 0xe9, 0x07, 0x4a, 0xc9, 0xa2, 0x16, 0xe5, 0xa6, 0xf5, 0x60, 0x15, 0xa2, 0x94, 0x8a, 0x45, + 0xa9, 0x35, 0x24, 0x75, 0xbe, 0xeb, 0x8e, 0x07,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x4d, 0x79, 0x7f, 0x39, + 0x63, 0xa1, 0xb0, 0x13, 0x90, 0x82, 0x91, 0x85, 0x1b, 0x8b, 0x50, 0xf3, 0xe3, 0x4e, 0xd9, 0x59, + 0x09, 0x13, 0x3a, 0xdc, 0x46, 0xf8, 0x0b, 0x90, 0xc3, 0x71, 0x86, 0x5f, 0x2c, 0x22, 0xb8, 0x6b, + 0xec, 0x29, 0x5b, 0x73, 0xb2, 0xdb, 0x0b, 0xfe, 0xf6, 0x04, 0xa9, 0x04, 0x33, 0x63, 0x71, 0x2a, + 0xf3, 0x73, 0x6e, 0x71, 0x2a, 0x77, 0x4c, 0xa3, 0x6d, 0x84, 0xad, 0x78, 0xc4, 0x3c, 0x5f, 0xee, + 0xed, 0x8b, 0xfc, 0xe9, 0xcb, 0x9a, 0x8b, 0x36, 0x9d, 0x42, 0x36, 0x94, 0xd5, 0xce, 0x52, 0x2f, + 0xc0, 0xad, 0xec, 0x5e, 0xac, 0x06, 0x0a, 0x7d, 0xd6, 0xd0, 0x36, 0xc2, 0x07, 0x90, 0xe5, 0xdf, + 0x0d, 0x5e, 0xa8, 0xaa, 0xe4, 0xe7, 0x75, 0x5f, 0x8b, 0x5a, 0xe5, 0x8b, 0x1b, 0x35, 0xf5, 0xf7, + 0x8d, 0x9a, 0xfa, 0x61, 0xa2, 0xa2, 0x8b, 0x89, 0x8a, 0xfe, 0x9a, 0xa8, 0xe8, 0x9f, 0x89, 0x8a, + 0xba, 0x32, 0xb7, 0xdc, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x80, 0xb2, 0x0e, 0x45, 0x6f, 0x0b, + 0x00, 0x00, } diff --git a/api/services/content/content.proto b/api/services/content/content.proto index dd250c830..52b5f63dc 100644 --- a/api/services/content/content.proto +++ b/api/services/content/content.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1; +package containerd.services.content.v1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; @@ -28,7 +28,7 @@ service Content { // 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(ReadRequest) returns (stream ReadResponse); + rpc Read(ReadContentRequest) returns (stream ReadContentResponse); // Status returns the status of ongoing object ingestions, started via // Write. @@ -54,7 +54,7 @@ service Content { // // 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 WriteRequest) returns (stream WriteResponse); + 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. @@ -91,9 +91,9 @@ message DeleteContentRequest { string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } -// ReadRequest defines the fields that make up a request to read a portion of +// ReadContentRequest defines the fields that make up a request to read a portion of // data from a stored object. -message ReadRequest { +message ReadContentRequest { // Digest is the hash identity to read. string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; @@ -107,16 +107,12 @@ message ReadRequest { int64 size = 3; } -// ReadResponse carries byte data for a read request. -message ReadResponse { +// ReadContentResponse carries byte data for a read request. +message ReadContentResponse { int64 offset = 1; // offset of the returned data bytes data = 2; // actual data } -message StatusRequest { - string regexp = 1; -} - message Status { google.protobuf.Timestamp started_at = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp updated_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; @@ -126,6 +122,10 @@ message Status { string expected = 6 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; } +message StatusRequest { + string filter = 1; +} + message StatusResponse { repeated Status statuses = 1 [(gogoproto.nullable) = false]; } @@ -157,8 +157,8 @@ enum WriteAction { COMMIT = 2 [(gogoproto.enumvalue_customname) = "WriteActionCommit"]; } -// WriteRequest writes data to the request ref at offset. -message WriteRequest { +// 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 @@ -215,8 +215,8 @@ message WriteRequest { bytes data = 6; } -// WriteResponse is returned on the culmination of a write call. -message WriteResponse { +// 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; diff --git a/api/services/diff/diff.pb.go b/api/services/diff/diff.pb.go index 1891bac5e..991e02682 100644 --- a/api/services/diff/diff.pb.go +++ b/api/services/diff/diff.pb.go @@ -96,10 +96,10 @@ func (*DiffResponse) ProtoMessage() {} func (*DiffResponse) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{3} } func init() { - proto.RegisterType((*ApplyRequest)(nil), "containerd.v1.ApplyRequest") - proto.RegisterType((*ApplyResponse)(nil), "containerd.v1.ApplyResponse") - proto.RegisterType((*DiffRequest)(nil), "containerd.v1.DiffRequest") - proto.RegisterType((*DiffResponse)(nil), "containerd.v1.DiffResponse") + proto.RegisterType((*ApplyRequest)(nil), "containerd.services.diff.v1.ApplyRequest") + proto.RegisterType((*ApplyResponse)(nil), "containerd.services.diff.v1.ApplyResponse") + proto.RegisterType((*DiffRequest)(nil), "containerd.services.diff.v1.DiffRequest") + proto.RegisterType((*DiffResponse)(nil), "containerd.services.diff.v1.DiffResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -132,7 +132,7 @@ func NewDiffClient(cc *grpc.ClientConn) DiffClient { func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) { out := new(ApplyResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Diff/Apply", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -141,7 +141,7 @@ func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.C func (c *diffClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) { out := new(DiffResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Diff/Diff", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -174,7 +174,7 @@ func _Diff_Apply_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Diff/Apply", + FullMethod: "/containerd.services.diff.v1.Diff/Apply", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DiffServer).Apply(ctx, req.(*ApplyRequest)) @@ -192,7 +192,7 @@ func _Diff_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Diff/Diff", + FullMethod: "/containerd.services.diff.v1.Diff/Diff", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DiffServer).Diff(ctx, req.(*DiffRequest)) @@ -201,7 +201,7 @@ func _Diff_Diff_Handler(srv interface{}, ctx context.Context, dec func(interface } var _Diff_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.Diff", + ServiceName: "containerd.services.diff.v1.Diff", HandlerType: (*DiffServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1081,31 +1081,32 @@ func init() { } var fileDescriptorDiff = []byte{ - // 407 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0xcf, 0x93, 0x40, - 0x10, 0xfd, 0x56, 0xda, 0xcf, 0x74, 0xdb, 0x26, 0x66, 0xe3, 0x81, 0x50, 0xa5, 0x0d, 0xa7, 0x9e, - 0x40, 0xe9, 0xc9, 0x44, 0x63, 0xac, 0x8d, 0x07, 0x13, 0x2f, 0xc4, 0xbb, 0xa1, 0x30, 0xd0, 0x4d, - 0x80, 0x5d, 0xd9, 0xa5, 0x86, 0x9b, 0x77, 0xff, 0x84, 0x3f,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 0xf1, 0x54, 0x0f, 0x16, 0x9c, 0x15, 0x02, 0xc8, 0x0b, 0xfc, 0x30, 0xe4, 0x3c, 0xa3, 0x10, 0x5f, - 0x3b, 0xfc, 0xc4, 0x77, 0xbe, 0x23, 0x3c, 0xde, 0xd0, 0x24, 0x39, 0x2d, 0xe1, 0xe2, 0x41, 0x06, - 0x89, 0x34, 0xd1, 0x7f, 0xdd, 0x28, 0x1e, 0x79, 0x86, 0x87, 0x25, 0x4d, 0x77, 0xf2, 0x0a, 0xfb, - 0x1d, 0x91, 0x3c, 0xc5, 0x38, 0x87, 0x98, 0x86, 0x9f, 0x5a, 0xcc, 0x34, 0x16, 0x68, 0x39, 0x0a, - 0x46, 0xea, 0xe6, 0x63, 0xcd, 0x81, 0x3c, 0xc2, 0x46, 0x09, 0x89, 0x39, 0x54, 0xf7, 0x6d, 0xe9, - 0xbc, 0xc5, 0x93, 0xce, 0xa1, 0xde, 0xf6, 0x94, 0xb3, 0x71, 0x43, 0xce, 0xfe, 0x37, 0x84, 0x07, - 0xad, 0x0a, 0x59, 0xe3, 0xa1, 0x0a, 0x8f, 0xcc, 0xce, 0x1a, 0xfb, 0xff, 0xd2, 0x7a, 0x72, 0x19, - 0xd4, 0x0e, 0x5e, 0x6b, 0xad, 0xf3, 0x6d, 0x7b, 0x41, 0x5a, 0xb3, 0x8b, 0x58, 0x27, 0xb0, 0x36, - 0x0f, 0x47, 0xfb, 0xee, 0xe7, 0xd1, 0xbe, 0xfb, 0xda, 0xd8, 0xe8, 0xd0, 0xd8, 0xe8, 0x47, 0x63, - 0xa3, 0x5f, 0x8d, 0x8d, 0xb6, 0xf7, 0xea, 0x6d, 0xad, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x61, - 0x65, 0x17, 0x47, 0x85, 0x03, 0x00, 0x00, + // 420 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0x8f, 0x94, 0x40, + 0x14, 0xc7, 0x6f, 0x64, 0xf7, 0xcc, 0xcd, 0x9e, 0x89, 0x99, 0x58, 0x10, 0x2e, 0x72, 0x1b, 0x2a, + 0xce, 0x62, 0xf0, 0xb8, 0xca, 0x44, 0x0b, 0xf5, 0x62, 0x61, 0x62, 0x43, 0xec, 0x4c, 0x34, 0x2c, + 0x3c, 0xb8, 0x49, 0x80, 0x19, 0x99, 0x61, 0x0d, 0x9d, 0x1f, 0xc5, 0xef, 0x62, 0x73, 0xa5, 0xa5, + 0xa5, 0xcb, 0x27, 0x31, 0x0c, 0x83, 0x12, 0x63, 0xf6, 0xd8, 0x66, 0xf2, 0x98, 0xf7, 0x7b, 0xef, + 0xfd, 0xdf, 0x9f, 0xc1, 0x2f, 0x72, 0xa6, 0x6e, 0x9a, 0x0d, 0x4d, 0x78, 0x19, 0x24, 0xbc, 0x52, + 0x31, 0xab, 0xa0, 0x4e, 0xa7, 0x61, 0x2c, 0x58, 0x20, 0xa1, 0xde, 0xb2, 0x04, 0x64, 0x90, 0xb2, + 0x2c, 0xd3, 0x07, 0x15, 0x35, 0x57, 0x9c, 0x9c, 0xfd, 0x05, 0xe9, 0x08, 0x51, 0x9d, 0xdf, 0x5e, + 0x3a, 0x8f, 0x72, 0x9e, 0x73, 0xcd, 0x05, 0x7d, 0x34, 0x94, 0x38, 0x67, 0x39, 0xe7, 0x79, 0x01, + 0x81, 0xfe, 0xda, 0x34, 0x59, 0x00, 0xa5, 0x50, 0xad, 0x49, 0x9e, 0xff, 0x9b, 0x54, 0xac, 0x04, + 0xa9, 0xe2, 0x52, 0x18, 0xe0, 0xf9, 0x2c, 0xbd, 0xaa, 0x15, 0x20, 0x83, 0x92, 0x37, 0x95, 0x1a, + 0x4e, 0x53, 0xfd, 0xe6, 0x80, 0xea, 0x14, 0x64, 0x52, 0x33, 0xa1, 0x78, 0x3d, 0x09, 0x87, 0x3e, + 0xde, 0x17, 0x7c, 0xfa, 0x52, 0x88, 0x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0x5f, 0xd9, 0xb7, 0x3b, 0xf7, + 0xe8, 0xe7, 0xce, 0x3d, 0xfa, 0xda, 0xb9, 0xe8, 0xb6, 0x73, 0xd1, 0x8f, 0xce, 0x45, 0xbf, 0x3a, + 0x17, 0x6d, 0x8e, 0xf5, 0x9b, 0xbc, 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xee, 0xae, 0xcf, + 0xcb, 0x03, 0x00, 0x00, } diff --git a/api/services/diff/diff.proto b/api/services/diff/diff.proto index 757eb27cb..ef3fd0395 100644 --- a/api/services/diff/diff.proto +++ b/api/services/diff/diff.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1; +package containerd.services.diff.v1; import "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; diff --git a/api/services/events/events.pb.go b/api/services/events/events.pb.go index 4652c6017..724f048c5 100644 --- a/api/services/events/events.pb.go +++ b/api/services/events/events.pb.go @@ -9,7 +9,7 @@ github.com/containerd/containerd/api/services/events/events.proto It has these top-level messages: - EventStreamRequest + StreamEventsRequest */ package events @@ -39,15 +39,15 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -type EventStreamRequest struct { +type StreamEventsRequest struct { } -func (m *EventStreamRequest) Reset() { *m = EventStreamRequest{} } -func (*EventStreamRequest) ProtoMessage() {} -func (*EventStreamRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{0} } +func (m *StreamEventsRequest) Reset() { *m = StreamEventsRequest{} } +func (*StreamEventsRequest) ProtoMessage() {} +func (*StreamEventsRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{0} } func init() { - proto.RegisterType((*EventStreamRequest)(nil), "containerd.v1.services.events.EventStreamRequest") + proto.RegisterType((*StreamEventsRequest)(nil), "containerd.services.events.v1.StreamEventsRequest") } // Reference imports to suppress errors if they are not otherwise used. @@ -61,7 +61,7 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Events service type EventsClient interface { - EventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (Events_EventStreamClient, error) + Stream(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (Events_StreamClient, error) } type eventsClient struct { @@ -72,12 +72,12 @@ func NewEventsClient(cc *grpc.ClientConn) EventsClient { return &eventsClient{cc} } -func (c *eventsClient) EventStream(ctx context.Context, in *EventStreamRequest, opts ...grpc.CallOption) (Events_EventStreamClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Events_serviceDesc.Streams[0], c.cc, "/containerd.v1.services.events.Events/EventStream", opts...) +func (c *eventsClient) Stream(ctx context.Context, in *StreamEventsRequest, opts ...grpc.CallOption) (Events_StreamClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Events_serviceDesc.Streams[0], c.cc, "/containerd.services.events.v1.Events/Stream", opts...) if err != nil { return nil, err } - x := &eventsEventStreamClient{stream} + x := &eventsStreamClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -87,16 +87,16 @@ func (c *eventsClient) EventStream(ctx context.Context, in *EventStreamRequest, return x, nil } -type Events_EventStreamClient interface { +type Events_StreamClient interface { Recv() (*containerd_v1_types.Envelope, error) grpc.ClientStream } -type eventsEventStreamClient struct { +type eventsStreamClient struct { grpc.ClientStream } -func (x *eventsEventStreamClient) Recv() (*containerd_v1_types.Envelope, error) { +func (x *eventsStreamClient) Recv() (*containerd_v1_types.Envelope, error) { m := new(containerd_v1_types.Envelope) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err @@ -107,49 +107,49 @@ func (x *eventsEventStreamClient) Recv() (*containerd_v1_types.Envelope, error) // Server API for Events service type EventsServer interface { - EventStream(*EventStreamRequest, Events_EventStreamServer) error + Stream(*StreamEventsRequest, Events_StreamServer) error } func RegisterEventsServer(s *grpc.Server, srv EventsServer) { s.RegisterService(&_Events_serviceDesc, srv) } -func _Events_EventStream_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(EventStreamRequest) +func _Events_Stream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(StreamEventsRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(EventsServer).EventStream(m, &eventsEventStreamServer{stream}) + return srv.(EventsServer).Stream(m, &eventsStreamServer{stream}) } -type Events_EventStreamServer interface { +type Events_StreamServer interface { Send(*containerd_v1_types.Envelope) error grpc.ServerStream } -type eventsEventStreamServer struct { +type eventsStreamServer struct { grpc.ServerStream } -func (x *eventsEventStreamServer) Send(m *containerd_v1_types.Envelope) error { +func (x *eventsStreamServer) Send(m *containerd_v1_types.Envelope) error { return x.ServerStream.SendMsg(m) } var _Events_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.services.events.Events", + ServiceName: "containerd.services.events.v1.Events", HandlerType: (*EventsServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { - StreamName: "EventStream", - Handler: _Events_EventStream_Handler, + StreamName: "Stream", + Handler: _Events_Stream_Handler, ServerStreams: true, }, }, Metadata: "github.com/containerd/containerd/api/services/events/events.proto", } -func (m *EventStreamRequest) Marshal() (dAtA []byte, err error) { +func (m *StreamEventsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -159,7 +159,7 @@ func (m *EventStreamRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventStreamRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *StreamEventsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -194,7 +194,7 @@ func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *EventStreamRequest) Size() (n int) { +func (m *StreamEventsRequest) Size() (n int) { var l int _ = l return n @@ -213,11 +213,11 @@ func sovEvents(x uint64) (n int) { func sozEvents(x uint64) (n int) { return sovEvents(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *EventStreamRequest) String() string { +func (this *StreamEventsRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&EventStreamRequest{`, + s := strings.Join([]string{`&StreamEventsRequest{`, `}`, }, "") return s @@ -230,7 +230,7 @@ func valueToStringEvents(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *EventStreamRequest) Unmarshal(dAtA []byte) error { +func (m *StreamEventsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -253,10 +253,10 @@ func (m *EventStreamRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventStreamRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StreamEventsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventStreamRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StreamEventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -390,17 +390,18 @@ func init() { } var fileDescriptorEvents = []byte{ - // 192 bytes of a gzipped FileDescriptorProto + // 194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0xc0, 0x28, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x59, 0x84, - 0x62, 0xbd, 0x32, 0x43, 0x3d, 0x98, 0x5a, 0x3d, 0x88, 0x22, 0x29, 0x1b, 0xa2, 0x6c, 0x28, 0xa9, - 0x2c, 0x80, 0x19, 0x0f, 0x21, 0x21, 0x86, 0x2b, 0x89, 0x70, 0x09, 0xb9, 0x82, 0xb8, 0xc1, 0x25, - 0x45, 0xa9, 0x89, 0xb9, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x46, 0xd9, 0x5c, 0x6c, 0x60, - 0xd1, 0x62, 0xa1, 0x44, 0x2e, 0x6e, 0x24, 0x79, 0x21, 0x43, 0x3d, 0xbc, 0x8e, 0xd1, 0xc3, 0x34, - 0x4b, 0x4a, 0x16, 0x4d, 0x0b, 0xd8, 0x25, 0x7a, 0xae, 0x79, 0x65, 0xa9, 0x39, 0xf9, 0x05, 0xa9, - 0x06, 0x8c, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, 0x48, 0x8e, - 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, - 0xbb, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x73, 0xbd, 0xf1, 0x45, 0x01, 0x00, 0x00, + 0x62, 0x3d, 0x98, 0x42, 0x3d, 0xa8, 0x8a, 0x32, 0x43, 0x29, 0x1b, 0xa2, 0x6c, 0x28, 0xa9, 0x2c, + 0x80, 0x19, 0x0f, 0x21, 0x21, 0x86, 0x2b, 0x89, 0x72, 0x09, 0x07, 0x97, 0x14, 0xa5, 0x26, 0xe6, + 0xba, 0x82, 0x0d, 0x0c, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x31, 0x4a, 0xe7, 0x62, 0x83, 0x08, + 0x08, 0xc5, 0x72, 0xb1, 0x41, 0x14, 0x08, 0x19, 0xe9, 0xe1, 0x75, 0x88, 0x1e, 0x16, 0x73, 0xa4, + 0x64, 0x91, 0xf5, 0x94, 0x19, 0xea, 0x81, 0x9d, 0xa1, 0xe7, 0x9a, 0x57, 0x96, 0x9a, 0x93, 0x5f, + 0x90, 0x6a, 0xc0, 0xe8, 0x24, 0x71, 0xe2, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, + 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x24, + 0x36, 0xb0, 0x03, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0x06, 0x73, 0x76, 0x42, 0x01, + 0x00, 0x00, } diff --git a/api/services/events/events.proto b/api/services/events/events.proto index 66ff6eced..ddbecefa9 100644 --- a/api/services/events/events.proto +++ b/api/services/events/events.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package containerd.v1.services.events; +package containerd.services.events.v1; import "github.com/containerd/containerd/api/types/event/event.proto"; service Events { - rpc EventStream(EventStreamRequest) returns (stream containerd.v1.types.Envelope); + rpc Stream(StreamEventsRequest) returns (stream containerd.v1.types.Envelope); } -message EventStreamRequest {} +message StreamEventsRequest {} diff --git a/api/services/execution/execution.pb.go b/api/services/execution/execution.pb.go index 133aebaef..6ab8d66c5 100644 --- a/api/services/execution/execution.pb.go +++ b/api/services/execution/execution.pb.go @@ -9,28 +9,27 @@ github.com/containerd/containerd/api/services/execution/execution.proto It has these top-level messages: - CreateRequest - CreateResponse - StartRequest - DeleteRequest + CreateTaskRequest + CreateTaskResponse + StartTaskRequest + DeleteTaskRequest DeleteResponse DeleteProcessRequest - InfoRequest - InfoResponse - ListRequest - ListResponse + GetTaskRequest + GetTaskResponse + ListTasksRequest + ListTasksResponse KillRequest - EventsRequest - ExecRequest - ExecResponse - PtyRequest - CloseStdinRequest - PauseRequest - ResumeRequest - ProcessesRequest - ProcessesResponse - CheckpointRequest - CheckpointResponse + ExecProcessRequest + ExecProcessResponse + ResizePtyRequest + CloseIORequest + PauseTaskRequest + ResumeTaskRequest + ListProcessesRequest + ListProcessesResponse + CheckpointTaskRequest + CheckpointTaskResponse */ package execution @@ -57,6 +56,7 @@ import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -72,14 +72,12 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package -type CreateRequest struct { +type CreateTaskRequest struct { // ContainerID specifies the container to use for creating this task. // // The spec from the provided container id will be used to create the // task associated with this container. Only one task can be run at a time // per container. - // - // This should be created using the Containers service. ContainerID string `protobuf:"bytes,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // RootFS provides the pre-chroot mounts to perform in the shim before // executing the container task. @@ -88,41 +86,41 @@ type CreateRequest struct { // Typically, these mounts should be resolved from snapshots specified on // the container object. Rootfs []*containerd_v1_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"` - Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"` - Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"` - Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"` - Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"` - Checkpoint *containerd_v1_types1.Descriptor `protobuf:"bytes,9,opt,name=checkpoint" json:"checkpoint,omitempty"` + Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"` + Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"` + Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"` + Terminal bool `protobuf:"varint,7,opt,name=terminal,proto3" json:"terminal,omitempty"` + Checkpoint *containerd_v1_types1.Descriptor `protobuf:"bytes,8,opt,name=checkpoint" json:"checkpoint,omitempty"` } -func (m *CreateRequest) Reset() { *m = CreateRequest{} } -func (*CreateRequest) ProtoMessage() {} -func (*CreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{0} } +func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} } +func (*CreateTaskRequest) ProtoMessage() {} +func (*CreateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{0} } -type CreateResponse struct { +type CreateTaskResponse struct { ContainerID string `protobuf:"bytes,2,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"` } -func (m *CreateResponse) Reset() { *m = CreateResponse{} } -func (*CreateResponse) ProtoMessage() {} -func (*CreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{1} } +func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } +func (*CreateTaskResponse) ProtoMessage() {} +func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{1} } -type StartRequest struct { +type StartTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *StartRequest) Reset() { *m = StartRequest{} } -func (*StartRequest) ProtoMessage() {} -func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{2} } +func (m *StartTaskRequest) Reset() { *m = StartTaskRequest{} } +func (*StartTaskRequest) ProtoMessage() {} +func (*StartTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{2} } -type DeleteRequest struct { +type DeleteTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{3} } +func (m *DeleteTaskRequest) Reset() { *m = DeleteTaskRequest{} } +func (*DeleteTaskRequest) ProtoMessage() {} +func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{3} } type DeleteResponse struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` @@ -143,36 +141,37 @@ func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRe func (*DeleteProcessRequest) ProtoMessage() {} func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{5} } -type InfoRequest struct { +type GetTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *InfoRequest) Reset() { *m = InfoRequest{} } -func (*InfoRequest) ProtoMessage() {} -func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{6} } +func (m *GetTaskRequest) Reset() { *m = GetTaskRequest{} } +func (*GetTaskRequest) ProtoMessage() {} +func (*GetTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{6} } -type InfoResponse struct { +type GetTaskResponse struct { Task *containerd_v1_types2.Task `protobuf:"bytes,1,opt,name=task" json:"task,omitempty"` } -func (m *InfoResponse) Reset() { *m = InfoResponse{} } -func (*InfoResponse) ProtoMessage() {} -func (*InfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{7} } +func (m *GetTaskResponse) Reset() { *m = GetTaskResponse{} } +func (*GetTaskResponse) ProtoMessage() {} +func (*GetTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{7} } -type ListRequest struct { +type ListTasksRequest struct { + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } -func (m *ListRequest) Reset() { *m = ListRequest{} } -func (*ListRequest) ProtoMessage() {} -func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} } +func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } +func (*ListTasksRequest) ProtoMessage() {} +func (*ListTasksRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{8} } -type ListResponse struct { +type ListTasksResponse struct { Tasks []*containerd_v1_types2.Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` } -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (*ListResponse) ProtoMessage() {} -func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{9} } +func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } +func (*ListTasksResponse) ProtoMessage() {} +func (*ListTasksResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{9} } type KillRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` @@ -292,136 +291,124 @@ func _KillRequest_OneofSizer(msg proto.Message) (n int) { return n } -type EventsRequest struct { -} - -func (m *EventsRequest) Reset() { *m = EventsRequest{} } -func (*EventsRequest) ProtoMessage() {} -func (*EventsRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{11} } - -type ExecRequest struct { +type ExecProcessRequest struct { // ContainerID specifies the container in which to exec the process. ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"` - Stdin string `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"` - Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"` - Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"` + Stdin string `protobuf:"bytes,2,opt,name=stdin,proto3" json:"stdin,omitempty"` + Stdout string `protobuf:"bytes,3,opt,name=stdout,proto3" json:"stdout,omitempty"` + Stderr string `protobuf:"bytes,4,opt,name=stderr,proto3" json:"stderr,omitempty"` + Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"` // Spec for starting a process in the target container. // // For runc, this is a process spec, for example. Spec *google_protobuf1.Any `protobuf:"bytes,6,opt,name=spec" json:"spec,omitempty"` } -func (m *ExecRequest) Reset() { *m = ExecRequest{} } -func (*ExecRequest) ProtoMessage() {} -func (*ExecRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{12} } +func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} } +func (*ExecProcessRequest) ProtoMessage() {} +func (*ExecProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{11} } -type ExecResponse struct { +type ExecProcessResponse struct { Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` } -func (m *ExecResponse) Reset() { *m = ExecResponse{} } -func (*ExecResponse) ProtoMessage() {} -func (*ExecResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{13} } +func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} } +func (*ExecProcessResponse) ProtoMessage() {} +func (*ExecProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{12} } -type PtyRequest struct { +type ResizePtyRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"` Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` } -func (m *PtyRequest) Reset() { *m = PtyRequest{} } -func (*PtyRequest) ProtoMessage() {} -func (*PtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{14} } +func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} } +func (*ResizePtyRequest) ProtoMessage() {} +func (*ResizePtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{13} } -type CloseStdinRequest struct { +type CloseIORequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` + Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"` } -func (m *CloseStdinRequest) Reset() { *m = CloseStdinRequest{} } -func (*CloseStdinRequest) ProtoMessage() {} -func (*CloseStdinRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} } +func (m *CloseIORequest) Reset() { *m = CloseIORequest{} } +func (*CloseIORequest) ProtoMessage() {} +func (*CloseIORequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{14} } -type PauseRequest struct { +type PauseTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *PauseRequest) Reset() { *m = PauseRequest{} } -func (*PauseRequest) ProtoMessage() {} -func (*PauseRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{16} } +func (m *PauseTaskRequest) Reset() { *m = PauseTaskRequest{} } +func (*PauseTaskRequest) ProtoMessage() {} +func (*PauseTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} } -type ResumeRequest struct { +type ResumeTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *ResumeRequest) Reset() { *m = ResumeRequest{} } -func (*ResumeRequest) ProtoMessage() {} -func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{17} } +func (m *ResumeTaskRequest) Reset() { *m = ResumeTaskRequest{} } +func (*ResumeTaskRequest) ProtoMessage() {} +func (*ResumeTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{16} } -type ProcessesRequest struct { +type ListProcessesRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` } -func (m *ProcessesRequest) Reset() { *m = ProcessesRequest{} } -func (*ProcessesRequest) ProtoMessage() {} -func (*ProcessesRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{18} } +func (m *ListProcessesRequest) Reset() { *m = ListProcessesRequest{} } +func (*ListProcessesRequest) ProtoMessage() {} +func (*ListProcessesRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{17} } -type ProcessesResponse struct { +type ListProcessesResponse struct { Processes []*containerd_v1_types2.Process `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"` } -func (m *ProcessesResponse) Reset() { *m = ProcessesResponse{} } -func (*ProcessesResponse) ProtoMessage() {} -func (*ProcessesResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{19} } +func (m *ListProcessesResponse) Reset() { *m = ListProcessesResponse{} } +func (*ListProcessesResponse) ProtoMessage() {} +func (*ListProcessesResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{18} } -type CheckpointRequest struct { +type CheckpointTaskRequest struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - AllowTcp bool `protobuf:"varint,2,opt,name=allow_tcp,json=allowTcp,proto3" json:"allow_tcp,omitempty"` - AllowUnixSockets bool `protobuf:"varint,3,opt,name=allow_unix_sockets,json=allowUnixSockets,proto3" json:"allow_unix_sockets,omitempty"` - AllowTerminal bool `protobuf:"varint,4,opt,name=allow_terminal,json=allowTerminal,proto3" json:"allow_terminal,omitempty"` - FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"` - EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces" json:"empty_namespaces,omitempty"` - ParentCheckpoint github_com_opencontainers_go_digest.Digest `protobuf:"bytes,7,opt,name=parent_checkpoint,json=parentCheckpoint,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"parent_checkpoint"` - Exit bool `protobuf:"varint,8,opt,name=exit,proto3" json:"exit,omitempty"` + ParentCheckpoint github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=parent_checkpoint,json=parentCheckpoint,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"parent_checkpoint"` + Options map[string]string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *CheckpointRequest) Reset() { *m = CheckpointRequest{} } -func (*CheckpointRequest) ProtoMessage() {} -func (*CheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{20} } +func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} } +func (*CheckpointTaskRequest) ProtoMessage() {} +func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{19} } -type CheckpointResponse struct { +type CheckpointTaskResponse struct { Descriptors []*containerd_v1_types1.Descriptor `protobuf:"bytes,1,rep,name=descriptors" json:"descriptors,omitempty"` } -func (m *CheckpointResponse) Reset() { *m = CheckpointResponse{} } -func (*CheckpointResponse) ProtoMessage() {} -func (*CheckpointResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{21} } +func (m *CheckpointTaskResponse) Reset() { *m = CheckpointTaskResponse{} } +func (*CheckpointTaskResponse) ProtoMessage() {} +func (*CheckpointTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{20} } func init() { - proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.execution.CreateRequest") - proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.execution.CreateResponse") - proto.RegisterType((*StartRequest)(nil), "containerd.v1.services.execution.StartRequest") - proto.RegisterType((*DeleteRequest)(nil), "containerd.v1.services.execution.DeleteRequest") - proto.RegisterType((*DeleteResponse)(nil), "containerd.v1.services.execution.DeleteResponse") - proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.v1.services.execution.DeleteProcessRequest") - proto.RegisterType((*InfoRequest)(nil), "containerd.v1.services.execution.InfoRequest") - proto.RegisterType((*InfoResponse)(nil), "containerd.v1.services.execution.InfoResponse") - proto.RegisterType((*ListRequest)(nil), "containerd.v1.services.execution.ListRequest") - proto.RegisterType((*ListResponse)(nil), "containerd.v1.services.execution.ListResponse") - proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.execution.KillRequest") - proto.RegisterType((*EventsRequest)(nil), "containerd.v1.services.execution.EventsRequest") - proto.RegisterType((*ExecRequest)(nil), "containerd.v1.services.execution.ExecRequest") - proto.RegisterType((*ExecResponse)(nil), "containerd.v1.services.execution.ExecResponse") - proto.RegisterType((*PtyRequest)(nil), "containerd.v1.services.execution.PtyRequest") - proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.execution.CloseStdinRequest") - proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.execution.PauseRequest") - proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.execution.ResumeRequest") - proto.RegisterType((*ProcessesRequest)(nil), "containerd.v1.services.execution.ProcessesRequest") - proto.RegisterType((*ProcessesResponse)(nil), "containerd.v1.services.execution.ProcessesResponse") - proto.RegisterType((*CheckpointRequest)(nil), "containerd.v1.services.execution.CheckpointRequest") - proto.RegisterType((*CheckpointResponse)(nil), "containerd.v1.services.execution.CheckpointResponse") + proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest") + proto.RegisterType((*CreateTaskResponse)(nil), "containerd.services.tasks.v1.CreateTaskResponse") + proto.RegisterType((*StartTaskRequest)(nil), "containerd.services.tasks.v1.StartTaskRequest") + proto.RegisterType((*DeleteTaskRequest)(nil), "containerd.services.tasks.v1.DeleteTaskRequest") + proto.RegisterType((*DeleteResponse)(nil), "containerd.services.tasks.v1.DeleteResponse") + proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.services.tasks.v1.DeleteProcessRequest") + proto.RegisterType((*GetTaskRequest)(nil), "containerd.services.tasks.v1.GetTaskRequest") + proto.RegisterType((*GetTaskResponse)(nil), "containerd.services.tasks.v1.GetTaskResponse") + proto.RegisterType((*ListTasksRequest)(nil), "containerd.services.tasks.v1.ListTasksRequest") + proto.RegisterType((*ListTasksResponse)(nil), "containerd.services.tasks.v1.ListTasksResponse") + proto.RegisterType((*KillRequest)(nil), "containerd.services.tasks.v1.KillRequest") + proto.RegisterType((*ExecProcessRequest)(nil), "containerd.services.tasks.v1.ExecProcessRequest") + proto.RegisterType((*ExecProcessResponse)(nil), "containerd.services.tasks.v1.ExecProcessResponse") + proto.RegisterType((*ResizePtyRequest)(nil), "containerd.services.tasks.v1.ResizePtyRequest") + proto.RegisterType((*CloseIORequest)(nil), "containerd.services.tasks.v1.CloseIORequest") + proto.RegisterType((*PauseTaskRequest)(nil), "containerd.services.tasks.v1.PauseTaskRequest") + proto.RegisterType((*ResumeTaskRequest)(nil), "containerd.services.tasks.v1.ResumeTaskRequest") + proto.RegisterType((*ListProcessesRequest)(nil), "containerd.services.tasks.v1.ListProcessesRequest") + proto.RegisterType((*ListProcessesResponse)(nil), "containerd.services.tasks.v1.ListProcessesResponse") + proto.RegisterType((*CheckpointTaskRequest)(nil), "containerd.services.tasks.v1.CheckpointTaskRequest") + proto.RegisterType((*CheckpointTaskResponse)(nil), "containerd.services.tasks.v1.CheckpointTaskResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -435,21 +422,24 @@ const _ = grpc.SupportPackageIsVersion4 // Client API for Tasks service type TasksClient interface { - Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) - Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) + // Create a task. + Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) + // Start a task. + Start(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) + // Delete a task and on disk state. + Delete(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteResponse, error) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) - Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) - List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) + Get(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error) + List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // Kill a task or process. Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (Tasks_EventsClient, error) - Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) - Pty(ctx context.Context, in *PtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) - Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error) - Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error) + Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*ExecProcessResponse, error) + ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) + CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) + Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) + Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) + ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error) + Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error) } type tasksClient struct { @@ -460,27 +450,27 @@ func NewTasksClient(cc *grpc.ClientConn) TasksClient { return &tasksClient{cc} } -func (c *tasksClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { - out := new(CreateResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Create", in, out, c.cc, opts...) +func (c *tasksClient) Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) { + out := new(CreateTaskResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Create", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { +func (c *tasksClient) Start(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Start", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Start", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { +func (c *tasksClient) Delete(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -489,25 +479,25 @@ func (c *tasksClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grp func (c *tasksClient) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/DeleteProcess", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/DeleteProcess", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) { - out := new(InfoResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Info", in, out, c.cc, opts...) +func (c *tasksClient) Get(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error) { + out := new(GetTaskResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { - out := new(ListResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/List", in, out, c.cc, opts...) +func (c *tasksClient) List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/List", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -516,102 +506,70 @@ func (c *tasksClient) List(ctx context.Context, in *ListRequest, opts ...grpc.Ca func (c *tasksClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Kill", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Kill", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (Tasks_EventsClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Tasks_serviceDesc.Streams[0], c.cc, "/containerd.v1.services.execution.Tasks/Events", opts...) - if err != nil { - return nil, err - } - x := &tasksEventsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Tasks_EventsClient interface { - Recv() (*containerd_v1_types2.Event, error) - grpc.ClientStream -} - -type tasksEventsClient struct { - grpc.ClientStream -} - -func (x *tasksEventsClient) Recv() (*containerd_v1_types2.Event, error) { - m := new(containerd_v1_types2.Event) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *tasksClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) { - out := new(ExecResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Exec", in, out, c.cc, opts...) +func (c *tasksClient) Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*ExecProcessResponse, error) { + out := new(ExecProcessResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Exec", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Pty(ctx context.Context, in *PtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { +func (c *tasksClient) ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Pty", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ResizePty", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { +func (c *tasksClient) CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/CloseStdin", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/CloseIO", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { +func (c *tasksClient) Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Pause", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Pause", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { +func (c *tasksClient) Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { out := new(google_protobuf.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Resume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Resume", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error) { - out := new(ProcessesResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Processes", in, out, c.cc, opts...) +func (c *tasksClient) ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error) { + out := new(ListProcessesResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ListProcesses", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *tasksClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*CheckpointResponse, error) { - out := new(CheckpointResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.execution.Tasks/Checkpoint", in, out, c.cc, opts...) +func (c *tasksClient) Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error) { + out := new(CheckpointTaskResponse) + err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Checkpoint", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -621,21 +579,24 @@ func (c *tasksClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opt // Server API for Tasks service type TasksServer interface { - Create(context.Context, *CreateRequest) (*CreateResponse, error) - Start(context.Context, *StartRequest) (*google_protobuf.Empty, error) - Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) + // Create a task. + Create(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error) + // Start a task. + Start(context.Context, *StartTaskRequest) (*google_protobuf.Empty, error) + // Delete a task and on disk state. + Delete(context.Context, *DeleteTaskRequest) (*DeleteResponse, error) DeleteProcess(context.Context, *DeleteProcessRequest) (*DeleteResponse, error) - Info(context.Context, *InfoRequest) (*InfoResponse, error) - List(context.Context, *ListRequest) (*ListResponse, error) + Get(context.Context, *GetTaskRequest) (*GetTaskResponse, error) + List(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // Kill a task or process. Kill(context.Context, *KillRequest) (*google_protobuf.Empty, error) - Events(*EventsRequest, Tasks_EventsServer) error - Exec(context.Context, *ExecRequest) (*ExecResponse, error) - Pty(context.Context, *PtyRequest) (*google_protobuf.Empty, error) - CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf.Empty, error) - Pause(context.Context, *PauseRequest) (*google_protobuf.Empty, error) - Resume(context.Context, *ResumeRequest) (*google_protobuf.Empty, error) - Processes(context.Context, *ProcessesRequest) (*ProcessesResponse, error) - Checkpoint(context.Context, *CheckpointRequest) (*CheckpointResponse, error) + Exec(context.Context, *ExecProcessRequest) (*ExecProcessResponse, error) + ResizePty(context.Context, *ResizePtyRequest) (*google_protobuf.Empty, error) + CloseIO(context.Context, *CloseIORequest) (*google_protobuf.Empty, error) + Pause(context.Context, *PauseTaskRequest) (*google_protobuf.Empty, error) + Resume(context.Context, *ResumeTaskRequest) (*google_protobuf.Empty, error) + ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error) + Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error) } func RegisterTasksServer(s *grpc.Server, srv TasksServer) { @@ -643,7 +604,7 @@ func RegisterTasksServer(s *grpc.Server, srv TasksServer) { } func _Tasks_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRequest) + in := new(CreateTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -652,16 +613,16 @@ func _Tasks_Create_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Create", + FullMethod: "/containerd.services.tasks.v1.Tasks/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Create(ctx, req.(*CreateRequest)) + return srv.(TasksServer).Create(ctx, req.(*CreateTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Start_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartRequest) + in := new(StartTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -670,16 +631,16 @@ func _Tasks_Start_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Start", + FullMethod: "/containerd.services.tasks.v1.Tasks/Start", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Start(ctx, req.(*StartRequest)) + return srv.(TasksServer).Start(ctx, req.(*StartTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRequest) + in := new(DeleteTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -688,10 +649,10 @@ func _Tasks_Delete_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Delete", + FullMethod: "/containerd.services.tasks.v1.Tasks/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Delete(ctx, req.(*DeleteRequest)) + return srv.(TasksServer).Delete(ctx, req.(*DeleteTaskRequest)) } return interceptor(ctx, in, info, handler) } @@ -706,7 +667,7 @@ func _Tasks_DeleteProcess_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/DeleteProcess", + FullMethod: "/containerd.services.tasks.v1.Tasks/DeleteProcess", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).DeleteProcess(ctx, req.(*DeleteProcessRequest)) @@ -714,26 +675,26 @@ func _Tasks_DeleteProcess_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Tasks_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InfoRequest) +func _Tasks_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TasksServer).Info(ctx, in) + return srv.(TasksServer).Get(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Info", + FullMethod: "/containerd.services.tasks.v1.Tasks/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Info(ctx, req.(*InfoRequest)) + return srv.(TasksServer).Get(ctx, req.(*GetTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRequest) + in := new(ListTasksRequest) if err := dec(in); err != nil { return nil, err } @@ -742,10 +703,10 @@ func _Tasks_List_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/List", + FullMethod: "/containerd.services.tasks.v1.Tasks/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).List(ctx, req.(*ListRequest)) + return srv.(TasksServer).List(ctx, req.(*ListTasksRequest)) } return interceptor(ctx, in, info, handler) } @@ -760,7 +721,7 @@ func _Tasks_Kill_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Kill", + FullMethod: "/containerd.services.tasks.v1.Tasks/Kill", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(TasksServer).Kill(ctx, req.(*KillRequest)) @@ -768,29 +729,8 @@ func _Tasks_Kill_Handler(srv interface{}, ctx context.Context, dec func(interfac return interceptor(ctx, in, info, handler) } -func _Tasks_Events_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(EventsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(TasksServer).Events(m, &tasksEventsServer{stream}) -} - -type Tasks_EventsServer interface { - Send(*containerd_v1_types2.Event) error - grpc.ServerStream -} - -type tasksEventsServer struct { - grpc.ServerStream -} - -func (x *tasksEventsServer) Send(m *containerd_v1_types2.Event) error { - return x.ServerStream.SendMsg(m) -} - func _Tasks_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExecRequest) + in := new(ExecProcessRequest) if err := dec(in); err != nil { return nil, err } @@ -799,52 +739,52 @@ func _Tasks_Exec_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Exec", + FullMethod: "/containerd.services.tasks.v1.Tasks/Exec", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Exec(ctx, req.(*ExecRequest)) + return srv.(TasksServer).Exec(ctx, req.(*ExecProcessRequest)) } return interceptor(ctx, in, info, handler) } -func _Tasks_Pty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PtyRequest) +func _Tasks_ResizePty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResizePtyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TasksServer).Pty(ctx, in) + return srv.(TasksServer).ResizePty(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Pty", + FullMethod: "/containerd.services.tasks.v1.Tasks/ResizePty", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Pty(ctx, req.(*PtyRequest)) + return srv.(TasksServer).ResizePty(ctx, req.(*ResizePtyRequest)) } return interceptor(ctx, in, info, handler) } -func _Tasks_CloseStdin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CloseStdinRequest) +func _Tasks_CloseIO_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CloseIORequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TasksServer).CloseStdin(ctx, in) + return srv.(TasksServer).CloseIO(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/CloseStdin", + FullMethod: "/containerd.services.tasks.v1.Tasks/CloseIO", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).CloseStdin(ctx, req.(*CloseStdinRequest)) + return srv.(TasksServer).CloseIO(ctx, req.(*CloseIORequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Pause_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PauseRequest) + in := new(PauseTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -853,16 +793,16 @@ func _Tasks_Pause_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Pause", + FullMethod: "/containerd.services.tasks.v1.Tasks/Pause", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Pause(ctx, req.(*PauseRequest)) + return srv.(TasksServer).Pause(ctx, req.(*PauseTaskRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Resume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResumeRequest) + in := new(ResumeTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -871,34 +811,34 @@ func _Tasks_Resume_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Resume", + FullMethod: "/containerd.services.tasks.v1.Tasks/Resume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Resume(ctx, req.(*ResumeRequest)) + return srv.(TasksServer).Resume(ctx, req.(*ResumeTaskRequest)) } return interceptor(ctx, in, info, handler) } -func _Tasks_Processes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ProcessesRequest) +func _Tasks_ListProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListProcessesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(TasksServer).Processes(ctx, in) + return srv.(TasksServer).ListProcesses(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Processes", + FullMethod: "/containerd.services.tasks.v1.Tasks/ListProcesses", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Processes(ctx, req.(*ProcessesRequest)) + return srv.(TasksServer).ListProcesses(ctx, req.(*ListProcessesRequest)) } return interceptor(ctx, in, info, handler) } func _Tasks_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckpointRequest) + in := new(CheckpointTaskRequest) if err := dec(in); err != nil { return nil, err } @@ -907,16 +847,16 @@ func _Tasks_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.execution.Tasks/Checkpoint", + FullMethod: "/containerd.services.tasks.v1.Tasks/Checkpoint", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TasksServer).Checkpoint(ctx, req.(*CheckpointRequest)) + return srv.(TasksServer).Checkpoint(ctx, req.(*CheckpointTaskRequest)) } return interceptor(ctx, in, info, handler) } var _Tasks_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.services.execution.Tasks", + ServiceName: "containerd.services.tasks.v1.Tasks", HandlerType: (*TasksServer)(nil), Methods: []grpc.MethodDesc{ { @@ -936,8 +876,8 @@ var _Tasks_serviceDesc = grpc.ServiceDesc{ Handler: _Tasks_DeleteProcess_Handler, }, { - MethodName: "Info", - Handler: _Tasks_Info_Handler, + MethodName: "Get", + Handler: _Tasks_Get_Handler, }, { MethodName: "List", @@ -952,12 +892,12 @@ var _Tasks_serviceDesc = grpc.ServiceDesc{ Handler: _Tasks_Exec_Handler, }, { - MethodName: "Pty", - Handler: _Tasks_Pty_Handler, + MethodName: "ResizePty", + Handler: _Tasks_ResizePty_Handler, }, { - MethodName: "CloseStdin", - Handler: _Tasks_CloseStdin_Handler, + MethodName: "CloseIO", + Handler: _Tasks_CloseIO_Handler, }, { MethodName: "Pause", @@ -968,25 +908,19 @@ var _Tasks_serviceDesc = grpc.ServiceDesc{ Handler: _Tasks_Resume_Handler, }, { - MethodName: "Processes", - Handler: _Tasks_Processes_Handler, + MethodName: "ListProcesses", + Handler: _Tasks_ListProcesses_Handler, }, { MethodName: "Checkpoint", Handler: _Tasks_Checkpoint_Handler, }, }, - Streams: []grpc.StreamDesc{ - { - StreamName: "Events", - Handler: _Tasks_Events_Handler, - ServerStreams: true, - }, - }, + Streams: []grpc.StreamDesc{}, Metadata: "github.com/containerd/containerd/api/services/execution/execution.proto", } -func (m *CreateRequest) Marshal() (dAtA []byte, err error) { +func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -996,7 +930,7 @@ func (m *CreateRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1020,25 +954,25 @@ func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { } } if len(m.Stdin) > 0 { - dAtA[i] = 0x2a + dAtA[i] = 0x22 i++ i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdin))) i += copy(dAtA[i:], m.Stdin) } if len(m.Stdout) > 0 { - dAtA[i] = 0x32 + dAtA[i] = 0x2a i++ i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdout))) i += copy(dAtA[i:], m.Stdout) } if len(m.Stderr) > 0 { - dAtA[i] = 0x3a + dAtA[i] = 0x32 i++ i = encodeVarintExecution(dAtA, i, uint64(len(m.Stderr))) i += copy(dAtA[i:], m.Stderr) } if m.Terminal { - dAtA[i] = 0x40 + dAtA[i] = 0x38 i++ if m.Terminal { dAtA[i] = 1 @@ -1048,7 +982,7 @@ func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { i++ } if m.Checkpoint != nil { - dAtA[i] = 0x4a + dAtA[i] = 0x42 i++ i = encodeVarintExecution(dAtA, i, uint64(m.Checkpoint.Size())) n1, err := m.Checkpoint.MarshalTo(dAtA[i:]) @@ -1060,7 +994,7 @@ func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CreateResponse) Marshal() (dAtA []byte, err error) { +func (m *CreateTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1070,7 +1004,7 @@ func (m *CreateResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1089,7 +1023,7 @@ func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *StartRequest) Marshal() (dAtA []byte, err error) { +func (m *StartTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1099,7 +1033,7 @@ func (m *StartRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *StartTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1113,7 +1047,7 @@ func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { +func (m *DeleteTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1123,7 +1057,7 @@ func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *DeleteTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1203,7 +1137,7 @@ func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *InfoRequest) Marshal() (dAtA []byte, err error) { +func (m *GetTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1213,7 +1147,7 @@ func (m *InfoRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1227,7 +1161,7 @@ func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *InfoResponse) Marshal() (dAtA []byte, err error) { +func (m *GetTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1237,7 +1171,7 @@ func (m *InfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetTaskResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1255,7 +1189,7 @@ func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ListRequest) Marshal() (dAtA []byte, err error) { +func (m *ListTasksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1265,15 +1199,21 @@ func (m *ListRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ListTasksRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l + if len(m.Filter) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(m.Filter))) + i += copy(dAtA[i:], m.Filter) + } return i, nil } -func (m *ListResponse) Marshal() (dAtA []byte, err error) { +func (m *ListTasksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1283,7 +1223,7 @@ func (m *ListResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ListTasksResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1358,7 +1298,7 @@ func (m *KillRequest_Pid) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintExecution(dAtA, i, uint64(m.Pid)) return i, nil } -func (m *EventsRequest) Marshal() (dAtA []byte, err error) { +func (m *ExecProcessRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1368,25 +1308,7 @@ func (m *EventsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventsRequest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *ExecRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1397,8 +1319,26 @@ func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } + if len(m.Stdin) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdin))) + i += copy(dAtA[i:], m.Stdin) + } + if len(m.Stdout) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdout))) + i += copy(dAtA[i:], m.Stdout) + } + if len(m.Stderr) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(m.Stderr))) + i += copy(dAtA[i:], m.Stderr) + } if m.Terminal { - dAtA[i] = 0x10 + dAtA[i] = 0x28 i++ if m.Terminal { dAtA[i] = 1 @@ -1407,24 +1347,6 @@ func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) { } i++ } - if len(m.Stdin) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdin))) - i += copy(dAtA[i:], m.Stdin) - } - if len(m.Stdout) > 0 { - dAtA[i] = 0x22 - i++ - i = encodeVarintExecution(dAtA, i, uint64(len(m.Stdout))) - i += copy(dAtA[i:], m.Stdout) - } - if len(m.Stderr) > 0 { - dAtA[i] = 0x2a - i++ - i = encodeVarintExecution(dAtA, i, uint64(len(m.Stderr))) - i += copy(dAtA[i:], m.Stderr) - } if m.Spec != nil { dAtA[i] = 0x32 i++ @@ -1438,7 +1360,7 @@ func (m *ExecRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ExecResponse) Marshal() (dAtA []byte, err error) { +func (m *ExecProcessResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1448,7 +1370,7 @@ func (m *ExecResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExecResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1461,7 +1383,7 @@ func (m *ExecResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *PtyRequest) Marshal() (dAtA []byte, err error) { +func (m *ResizePtyRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1471,7 +1393,7 @@ func (m *PtyRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PtyRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1500,7 +1422,7 @@ func (m *PtyRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CloseStdinRequest) Marshal() (dAtA []byte, err error) { +func (m *CloseIORequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1510,7 +1432,7 @@ func (m *CloseStdinRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CloseStdinRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1526,10 +1448,20 @@ func (m *CloseStdinRequest) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintExecution(dAtA, i, uint64(m.Pid)) } + if m.Stdin { + dAtA[i] = 0x18 + i++ + if m.Stdin { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } return i, nil } -func (m *PauseRequest) Marshal() (dAtA []byte, err error) { +func (m *PauseTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1539,7 +1471,7 @@ func (m *PauseRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PauseRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *PauseTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1553,7 +1485,7 @@ func (m *PauseRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ResumeRequest) Marshal() (dAtA []byte, err error) { +func (m *ResumeTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1563,7 +1495,7 @@ func (m *ResumeRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ResumeTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1577,7 +1509,7 @@ func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ProcessesRequest) Marshal() (dAtA []byte, err error) { +func (m *ListProcessesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1587,7 +1519,7 @@ func (m *ProcessesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProcessesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ListProcessesRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1601,7 +1533,7 @@ func (m *ProcessesRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ProcessesResponse) Marshal() (dAtA []byte, err error) { +func (m *ListProcessesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1611,7 +1543,7 @@ func (m *ProcessesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProcessesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ListProcessesResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1631,7 +1563,7 @@ func (m *ProcessesResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CheckpointRequest) Marshal() (dAtA []byte, err error) { +func (m *CheckpointTaskRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1641,7 +1573,7 @@ func (m *CheckpointRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CheckpointRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1652,81 +1584,33 @@ func (m *CheckpointRequest) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintExecution(dAtA, i, uint64(len(m.ContainerID))) i += copy(dAtA[i:], m.ContainerID) } - if m.AllowTcp { - dAtA[i] = 0x10 - i++ - if m.AllowTcp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.AllowUnixSockets { - dAtA[i] = 0x18 - i++ - if m.AllowUnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.AllowTerminal { - dAtA[i] = 0x20 - i++ - if m.AllowTerminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.FileLocks { - dAtA[i] = 0x28 - i++ - if m.FileLocks { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - dAtA[i] = 0x32 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } if len(m.ParentCheckpoint) > 0 { - dAtA[i] = 0x3a + dAtA[i] = 0x12 i++ i = encodeVarintExecution(dAtA, i, uint64(len(m.ParentCheckpoint))) i += copy(dAtA[i:], m.ParentCheckpoint) } - if m.Exit { - dAtA[i] = 0x40 - i++ - if m.Exit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.Options) > 0 { + for k, _ := range m.Options { + dAtA[i] = 0x1a + i++ + v := m.Options[k] + mapSize := 1 + len(k) + sovExecution(uint64(len(k))) + 1 + len(v) + sovExecution(uint64(len(v))) + i = encodeVarintExecution(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintExecution(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) } - i++ } return i, nil } -func (m *CheckpointResponse) Marshal() (dAtA []byte, err error) { +func (m *CheckpointTaskResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -1736,7 +1620,7 @@ func (m *CheckpointResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CheckpointResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *CheckpointTaskResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -1783,7 +1667,7 @@ func encodeVarintExecution(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *CreateRequest) Size() (n int) { +func (m *CreateTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -1818,7 +1702,7 @@ func (m *CreateRequest) Size() (n int) { return n } -func (m *CreateResponse) Size() (n int) { +func (m *CreateTaskResponse) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -1831,7 +1715,7 @@ func (m *CreateResponse) Size() (n int) { return n } -func (m *StartRequest) Size() (n int) { +func (m *StartTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -1841,7 +1725,7 @@ func (m *StartRequest) Size() (n int) { return n } -func (m *DeleteRequest) Size() (n int) { +func (m *DeleteTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -1879,7 +1763,7 @@ func (m *DeleteProcessRequest) Size() (n int) { return n } -func (m *InfoRequest) Size() (n int) { +func (m *GetTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -1889,7 +1773,7 @@ func (m *InfoRequest) Size() (n int) { return n } -func (m *InfoResponse) Size() (n int) { +func (m *GetTaskResponse) Size() (n int) { var l int _ = l if m.Task != nil { @@ -1899,13 +1783,17 @@ func (m *InfoResponse) Size() (n int) { return n } -func (m *ListRequest) Size() (n int) { +func (m *ListTasksRequest) Size() (n int) { var l int _ = l + l = len(m.Filter) + if l > 0 { + n += 1 + l + sovExecution(uint64(l)) + } return n } -func (m *ListResponse) Size() (n int) { +func (m *ListTasksResponse) Size() (n int) { var l int _ = l if len(m.Tasks) > 0 { @@ -1945,22 +1833,13 @@ func (m *KillRequest_Pid) Size() (n int) { n += 1 + sovExecution(uint64(m.Pid)) return n } -func (m *EventsRequest) Size() (n int) { - var l int - _ = l - return n -} - -func (m *ExecRequest) Size() (n int) { +func (m *ExecProcessRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovExecution(uint64(l)) } - if m.Terminal { - n += 2 - } l = len(m.Stdin) if l > 0 { n += 1 + l + sovExecution(uint64(l)) @@ -1973,6 +1852,9 @@ func (m *ExecRequest) Size() (n int) { if l > 0 { n += 1 + l + sovExecution(uint64(l)) } + if m.Terminal { + n += 2 + } if m.Spec != nil { l = m.Spec.Size() n += 1 + l + sovExecution(uint64(l)) @@ -1980,7 +1862,7 @@ func (m *ExecRequest) Size() (n int) { return n } -func (m *ExecResponse) Size() (n int) { +func (m *ExecProcessResponse) Size() (n int) { var l int _ = l if m.Pid != 0 { @@ -1989,7 +1871,7 @@ func (m *ExecResponse) Size() (n int) { return n } -func (m *PtyRequest) Size() (n int) { +func (m *ResizePtyRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -2008,7 +1890,7 @@ func (m *PtyRequest) Size() (n int) { return n } -func (m *CloseStdinRequest) Size() (n int) { +func (m *CloseIORequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -2018,10 +1900,13 @@ func (m *CloseStdinRequest) Size() (n int) { if m.Pid != 0 { n += 1 + sovExecution(uint64(m.Pid)) } + if m.Stdin { + n += 2 + } return n } -func (m *PauseRequest) Size() (n int) { +func (m *PauseTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -2031,7 +1916,7 @@ func (m *PauseRequest) Size() (n int) { return n } -func (m *ResumeRequest) Size() (n int) { +func (m *ResumeTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -2041,7 +1926,7 @@ func (m *ResumeRequest) Size() (n int) { return n } -func (m *ProcessesRequest) Size() (n int) { +func (m *ListProcessesRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) @@ -2051,7 +1936,7 @@ func (m *ProcessesRequest) Size() (n int) { return n } -func (m *ProcessesResponse) Size() (n int) { +func (m *ListProcessesResponse) Size() (n int) { var l int _ = l if len(m.Processes) > 0 { @@ -2063,42 +1948,29 @@ func (m *ProcessesResponse) Size() (n int) { return n } -func (m *CheckpointRequest) Size() (n int) { +func (m *CheckpointTaskRequest) Size() (n int) { var l int _ = l l = len(m.ContainerID) if l > 0 { n += 1 + l + sovExecution(uint64(l)) } - if m.AllowTcp { - n += 2 - } - if m.AllowUnixSockets { - n += 2 - } - if m.AllowTerminal { - n += 2 - } - if m.FileLocks { - n += 2 - } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - l = len(s) - n += 1 + l + sovExecution(uint64(l)) - } - } l = len(m.ParentCheckpoint) if l > 0 { n += 1 + l + sovExecution(uint64(l)) } - if m.Exit { - n += 2 + if len(m.Options) > 0 { + for k, v := range m.Options { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovExecution(uint64(len(k))) + 1 + len(v) + sovExecution(uint64(len(v))) + n += mapEntrySize + 1 + sovExecution(uint64(mapEntrySize)) + } } return n } -func (m *CheckpointResponse) Size() (n int) { +func (m *CheckpointTaskResponse) Size() (n int) { var l int _ = l if len(m.Descriptors) > 0 { @@ -2123,11 +1995,11 @@ func sovExecution(x uint64) (n int) { func sozExecution(x uint64) (n int) { return sovExecution(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *CreateRequest) String() string { +func (this *CreateTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CreateRequest{`, + s := strings.Join([]string{`&CreateTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_v1_types.Mount", 1) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, @@ -2139,32 +2011,32 @@ func (this *CreateRequest) String() string { }, "") return s } -func (this *CreateResponse) String() string { +func (this *CreateTaskResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CreateResponse{`, + s := strings.Join([]string{`&CreateTaskResponse{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } -func (this *StartRequest) String() string { +func (this *StartTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&StartRequest{`, + s := strings.Join([]string{`&StartTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } -func (this *DeleteRequest) String() string { +func (this *DeleteTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteRequest{`, + s := strings.Join([]string{`&DeleteTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") @@ -2193,40 +2065,41 @@ func (this *DeleteProcessRequest) String() string { }, "") return s } -func (this *InfoRequest) String() string { +func (this *GetTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&InfoRequest{`, + s := strings.Join([]string{`&GetTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } -func (this *InfoResponse) String() string { +func (this *GetTaskResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&InfoResponse{`, + s := strings.Join([]string{`&GetTaskResponse{`, `Task:` + strings.Replace(fmt.Sprintf("%v", this.Task), "Task", "containerd_v1_types2.Task", 1) + `,`, `}`, }, "") return s } -func (this *ListRequest) String() string { +func (this *ListTasksRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListRequest{`, + s := strings.Join([]string{`&ListTasksRequest{`, + `Filter:` + fmt.Sprintf("%v", this.Filter) + `,`, `}`, }, "") return s } -func (this *ListResponse) String() string { +func (this *ListTasksResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListResponse{`, + s := strings.Join([]string{`&ListTasksResponse{`, `Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Task", "containerd_v1_types2.Task", 1) + `,`, `}`, }, "") @@ -2264,45 +2137,36 @@ func (this *KillRequest_Pid) String() string { }, "") return s } -func (this *EventsRequest) String() string { +func (this *ExecProcessRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&EventsRequest{`, - `}`, - }, "") - return s -} -func (this *ExecRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExecRequest{`, + s := strings.Join([]string{`&ExecProcessRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, - `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`, `Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`, + `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`, `}`, }, "") return s } -func (this *ExecResponse) String() string { +func (this *ExecProcessResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ExecResponse{`, + s := strings.Join([]string{`&ExecProcessResponse{`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `}`, }, "") return s } -func (this *PtyRequest) String() string { +func (this *ResizePtyRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PtyRequest{`, + s := strings.Join([]string{`&ResizePtyRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Width:` + fmt.Sprintf("%v", this.Width) + `,`, @@ -2311,79 +2175,85 @@ func (this *PtyRequest) String() string { }, "") return s } -func (this *CloseStdinRequest) String() string { +func (this *CloseIORequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CloseStdinRequest{`, + s := strings.Join([]string{`&CloseIORequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, + `Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`, `}`, }, "") return s } -func (this *PauseRequest) String() string { +func (this *PauseTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PauseRequest{`, + s := strings.Join([]string{`&PauseTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } -func (this *ResumeRequest) String() string { +func (this *ResumeTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResumeRequest{`, + s := strings.Join([]string{`&ResumeTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } -func (this *ProcessesRequest) String() string { +func (this *ListProcessesRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ProcessesRequest{`, + s := strings.Join([]string{`&ListProcessesRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `}`, }, "") return s } -func (this *ProcessesResponse) String() string { +func (this *ListProcessesResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ProcessesResponse{`, + s := strings.Join([]string{`&ListProcessesResponse{`, `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "Process", "containerd_v1_types2.Process", 1) + `,`, `}`, }, "") return s } -func (this *CheckpointRequest) String() string { +func (this *CheckpointTaskRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CheckpointRequest{`, + keysForOptions := make([]string, 0, len(this.Options)) + for k, _ := range this.Options { + keysForOptions = append(keysForOptions, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + mapStringForOptions := "map[string]string{" + for _, k := range keysForOptions { + mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) + } + mapStringForOptions += "}" + s := strings.Join([]string{`&CheckpointTaskRequest{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, - `AllowTcp:` + fmt.Sprintf("%v", this.AllowTcp) + `,`, - `AllowUnixSockets:` + fmt.Sprintf("%v", this.AllowUnixSockets) + `,`, - `AllowTerminal:` + fmt.Sprintf("%v", this.AllowTerminal) + `,`, - `FileLocks:` + fmt.Sprintf("%v", this.FileLocks) + `,`, - `EmptyNamespaces:` + fmt.Sprintf("%v", this.EmptyNamespaces) + `,`, `ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`, - `Exit:` + fmt.Sprintf("%v", this.Exit) + `,`, + `Options:` + mapStringForOptions + `,`, `}`, }, "") return s } -func (this *CheckpointResponse) String() string { +func (this *CheckpointTaskResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CheckpointResponse{`, + s := strings.Join([]string{`&CheckpointTaskResponse{`, `Descriptors:` + strings.Replace(fmt.Sprintf("%v", this.Descriptors), "Descriptor", "containerd_v1_types1.Descriptor", 1) + `,`, `}`, }, "") @@ -2397,7 +2267,7 @@ func valueToStringExecution(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *CreateRequest) Unmarshal(dAtA []byte) error { +func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2420,10 +2290,10 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CreateTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: @@ -2486,7 +2356,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } @@ -2515,7 +2385,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } @@ -2544,7 +2414,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } @@ -2573,7 +2443,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) } @@ -2593,7 +2463,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { } } m.Terminal = bool(v != 0) - case 9: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) } @@ -2647,7 +2517,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CreateResponse) Unmarshal(dAtA []byte) error { +func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2670,10 +2540,10 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CreateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CreateTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CreateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CreateTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: @@ -2745,7 +2615,7 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *StartRequest) Unmarshal(dAtA []byte) error { +func (m *StartTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2768,10 +2638,10 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StartRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StartTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StartRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StartTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2824,7 +2694,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2847,10 +2717,10 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3129,7 +2999,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *InfoRequest) Unmarshal(dAtA []byte) error { +func (m *GetTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3152,10 +3022,10 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InfoRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3208,7 +3078,7 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *InfoResponse) Unmarshal(dAtA []byte) error { +func (m *GetTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3231,10 +3101,10 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3291,7 +3161,7 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListRequest) Unmarshal(dAtA []byte) error { +func (m *ListTasksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3314,12 +3184,41 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListTasksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListTasksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthExecution + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipExecution(dAtA[iNdEx:]) @@ -3341,7 +3240,7 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListResponse) Unmarshal(dAtA []byte) error { +func (m *ListTasksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3364,10 +3263,10 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ListTasksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListTasksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3561,7 +3460,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventsRequest) Unmarshal(dAtA []byte) error { +func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3584,60 +3483,10 @@ func (m *EventsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ExecProcessRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipExecution(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthExecution - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExecRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExecProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3670,26 +3519,6 @@ func (m *ExecRequest) Unmarshal(dAtA []byte) error { m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Terminal = bool(v != 0) - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) } @@ -3718,7 +3547,7 @@ func (m *ExecRequest) Unmarshal(dAtA []byte) error { } m.Stdin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stdout", wireType) } @@ -3747,7 +3576,7 @@ func (m *ExecRequest) Unmarshal(dAtA []byte) error { } m.Stdout = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Stderr", wireType) } @@ -3776,6 +3605,26 @@ func (m *ExecRequest) Unmarshal(dAtA []byte) error { } m.Stderr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Terminal", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Terminal = bool(v != 0) case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) @@ -3830,7 +3679,7 @@ func (m *ExecRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExecResponse) Unmarshal(dAtA []byte) error { +func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3853,10 +3702,10 @@ func (m *ExecResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExecResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ExecProcessResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExecResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExecProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3899,7 +3748,7 @@ func (m *ExecResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PtyRequest) Unmarshal(dAtA []byte) error { +func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3922,10 +3771,10 @@ func (m *PtyRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PtyRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ResizePtyRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PtyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResizePtyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4035,7 +3884,7 @@ func (m *PtyRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CloseStdinRequest) Unmarshal(dAtA []byte) error { +func (m *CloseIORequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4058,10 +3907,10 @@ func (m *CloseStdinRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CloseStdinRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CloseIORequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CloseStdinRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CloseIORequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4112,6 +3961,26 @@ func (m *CloseStdinRequest) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Stdin", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Stdin = bool(v != 0) default: iNdEx = preIndex skippy, err := skipExecution(dAtA[iNdEx:]) @@ -4133,7 +4002,7 @@ func (m *CloseStdinRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PauseRequest) Unmarshal(dAtA []byte) error { +func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4156,10 +4025,10 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PauseRequest: wiretype end group for non-group") + return fmt.Errorf("proto: PauseTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PauseRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PauseTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4212,7 +4081,7 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResumeRequest) Unmarshal(dAtA []byte) error { +func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4235,10 +4104,10 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResumeRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ResumeTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResumeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResumeTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4291,7 +4160,7 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProcessesRequest) Unmarshal(dAtA []byte) error { +func (m *ListProcessesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4314,10 +4183,10 @@ func (m *ProcessesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProcessesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListProcessesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4370,7 +4239,7 @@ func (m *ProcessesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ProcessesResponse) Unmarshal(dAtA []byte) error { +func (m *ListProcessesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4393,10 +4262,10 @@ func (m *ProcessesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProcessesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ListProcessesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4451,7 +4320,7 @@ func (m *ProcessesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { +func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4474,10 +4343,10 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckpointRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CheckpointTaskRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckpointRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CheckpointTaskRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4510,115 +4379,6 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { m.ContainerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowTcp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowTcp = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowUnixSockets", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowUnixSockets = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowTerminal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowTerminal = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileLocks", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FileLocks = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EmptyNamespaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowExecution - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthExecution - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EmptyNamespaces = append(m.EmptyNamespaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParentCheckpoint", wireType) } @@ -4647,11 +4407,11 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { } m.ParentCheckpoint = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exit", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowExecution @@ -4661,12 +4421,108 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - m.Exit = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthExecution + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthExecution + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Options == nil { + m.Options = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExecution + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthExecution + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Options[mapkey] = mapvalue + } else { + var mapvalue string + m.Options[mapkey] = mapvalue + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipExecution(dAtA[iNdEx:]) @@ -4688,7 +4544,7 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CheckpointResponse) Unmarshal(dAtA []byte) error { +func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4711,10 +4567,10 @@ func (m *CheckpointResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CheckpointResponse: wiretype end group for non-group") + return fmt.Errorf("proto: CheckpointTaskResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CheckpointResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CheckpointTaskResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4879,83 +4735,80 @@ func init() { } var fileDescriptorExecution = []byte{ - // 1242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xdb, 0xc6, - 0x13, 0x37, 0xad, 0x8f, 0xbf, 0x34, 0x94, 0x12, 0x7b, 0x61, 0x04, 0x8a, 0xf2, 0xaf, 0x24, 0x10, - 0x28, 0xa0, 0x16, 0x09, 0x95, 0x2a, 0x45, 0x0f, 0x41, 0x8b, 0xc0, 0xb2, 0x9d, 0xd6, 0x48, 0x52, - 0xbb, 0xb4, 0xdb, 0x20, 0x40, 0x01, 0x81, 0x26, 0xd7, 0xf2, 0x42, 0x14, 0x97, 0xe5, 0xae, 0x6c, - 0xeb, 0x96, 0x37, 0x68, 0xcf, 0x7d, 0x82, 0xbe, 0x48, 0x01, 0x5f, 0x0a, 0xf4, 0x58, 0xf4, 0xe0, - 0x36, 0x7e, 0x8a, 0x1e, 0x8b, 0xdd, 0x25, 0x25, 0x4a, 0xb1, 0x2a, 0x3a, 0xca, 0x45, 0xda, 0x1d, - 0xce, 0xcc, 0xee, 0xfe, 0xe6, 0xe3, 0x37, 0xf0, 0x65, 0x8f, 0xf0, 0x93, 0xe1, 0x91, 0xe9, 0xd0, - 0x41, 0xcb, 0xa1, 0x3e, 0xb7, 0x89, 0x8f, 0x43, 0x37, 0xb9, 0xb4, 0x03, 0xd2, 0x62, 0x38, 0x3c, - 0x25, 0x0e, 0x66, 0x2d, 0x7c, 0x8e, 0x9d, 0x21, 0x27, 0xd4, 0x9f, 0xac, 0xcc, 0x20, 0xa4, 0x9c, - 0xa2, 0xc6, 0xc4, 0xc4, 0x3c, 0xfd, 0xc4, 0x8c, 0x2d, 0xcc, 0xb1, 0x5e, 0xf5, 0x5e, 0x8f,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, 0x20, - 0x2b, 0x58, 0x3e, 0xcd, 0x31, 0x89, 0x69, 0x60, 0x6e, 0x12, 0xbc, 0x84, 0xbc, 0xe2, 0xe8, 0x34, - 0x49, 0x30, 0xc5, 0xe6, 0xd5, 0xeb, 0x67, 0x7e, 0xa9, 0xf3, 0x50, 0x13, 0x70, 0x08, 0x6e, 0x4c, - 0x73, 0xcf, 0xc4, 0x48, 0x90, 0x06, 0x8e, 0x29, 0xca, 0x7d, 0x06, 0x99, 0x7d, 0x3e, 0x42, 0xf7, - 0x17, 0x9b, 0x4d, 0x68, 0x78, 0x2e, 0x18, 0xaf, 0x00, 0x26, 0x54, 0x89, 0x1e, 0xa5, 0x28, 0xd1, - 0x59, 0x62, 0x9d, 0xeb, 0x7a, 0x0f, 0x72, 0x92, 0x2a, 0xd3, 0x54, 0x6f, 0x92, 0x53, 0xe7, 0x3a, - 0xfc, 0x06, 0xf2, 0x8a, 0x37, 0xd3, 0x04, 0x6e, 0x8a, 0x61, 0xe7, 0xba, 0xe4, 0x50, 0x1c, 0xb3, - 0x1f, 0x6a, 0xa7, 0xb8, 0xe7, 0x0c, 0xe5, 0x56, 0x1f, 0xdd, 0xc8, 0x26, 0x8a, 0xe0, 0x19, 0x40, - 0xa2, 0x93, 0xa7, 0x01, 0x7d, 0x96, 0x4f, 0xab, 0x9f, 0xde, 0xcc, 0x48, 0x1d, 0xdc, 0xa9, 0x5c, - 0xbc, 0xa9, 0xad, 0xfc, 0xf1, 0xa6, 0xb6, 0xf2, 0xfa, 0xaa, 0xa6, 0x5d, 0x5c, 0xd5, 0xb4, 0xdf, - 0xaf, 0x6a, 0xda, 0xdf, 0x57, 0x35, 0xed, 0x28, 0x2f, 0x81, 0x79, 0xf4, 0x6f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x46, 0xa7, 0x8c, 0x94, 0xc8, 0x10, 0x00, 0x00, + // 1185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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0xaf, 0x92, 0xc9, 0xd9, 0x85, 0x42, 0x7f, 0x3a, 0x0b, 0xd3, 0x93, 0x38, 0x4d, + 0xc4, 0x31, 0xb5, 0xff, 0x00, 0xb2, 0xa2, 0x43, 0xa3, 0x36, 0xe4, 0x82, 0xc1, 0x02, 0x55, 0x13, + 0xfc, 0x1e, 0x1e, 0xcf, 0xd4, 0x8f, 0xa7, 0x07, 0x48, 0xcb, 0x8f, 0x21, 0x2b, 0x26, 0x0d, 0xa4, + 0x4f, 0x86, 0x0e, 0x8f, 0x23, 0xea, 0xfa, 0x9d, 0x0e, 0x76, 0xc0, 0x27, 0x6a, 0xd4, 0x82, 0x5c, + 0x40, 0xbf, 0x49, 0xd6, 0xdf, 0x19, 0x4c, 0xd4, 0x8f, 0xa6, 0x01, 0x44, 0x96, 0xbf, 0x86, 0xa5, + 0x01, 0x9e, 0x47, 0xb5, 0x69, 0xe0, 0x83, 0x5c, 0x31, 0xe3, 0x95, 0x67, 0x90, 0x3e, 0xc4, 0x0c, + 0x25, 0x80, 0x06, 0xe7, 0x03, 0x75, 0x73, 0x4a, 0x69, 0x79, 0x47, 0x0b, 0x32, 0xbc, 0x01, 0x24, + 0xe5, 0x63, 0x98, 0xfc, 0xd5, 0xea, 0xd4, 0xf2, 0xf2, 0xa2, 0x23, 0xc8, 0x70, 0x3a, 0x47, 0x1f, + 0x4e, 0x06, 0xc6, 0x28, 0x7f, 0x6c, 0xce, 0xdb, 0x90, 0xe1, 0x8c, 0x85, 0x12, 0xca, 0xef, 0x2e, + 0x57, 0xab, 0x5b, 0x33, 0x20, 0xa4, 0xdd, 0xa7, 0xb0, 0x18, 0x91, 0x5e, 0x52, 0x94, 0x86, 0xd9, + 0x71, 0xac, 0x07, 0xc7, 0xf0, 0x40, 0x32, 0x58, 0x52, 0x76, 0x07, 0x89, 0x6e, 0x82, 0xc2, 0xac, + 0x20, 0xa9, 0x24, 0x0b, 0x87, 0x99, 0x6c, 0xac, 0xc2, 0x6f, 0x21, 0x17, 0xb0, 0x55, 0xd2, 0xbb, + 0xba, 0xc3, 0x69, 0x63, 0x55, 0x5e, 0xc1, 0xd2, 0x00, 0xd7, 0x24, 0xbd, 0xa0, 0x51, 0x24, 0xa7, + 0x6e, 0xcf, 0x84, 0x91, 0x39, 0x7c, 0x03, 0x10, 0xeb, 0xf7, 0xdb, 0xef, 0xd0, 0xde, 0xd5, 0x4f, + 0x66, 0x03, 0x05, 0x17, 0xef, 0x15, 0xaf, 0xdf, 0x96, 0x16, 0xfe, 0x7a, 0x5b, 0x5a, 0xf8, 0xf1, + 0xb6, 0xa4, 0x5c, 0xdf, 0x96, 0x94, 0x3f, 0x6e, 0x4b, 0xca, 0xbf, 0xb7, 0x25, 0xe5, 0x2c, 0x27, + 0x82, 0xb3, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x3d, 0xe6, 0xfc, 0x90, 0x10, 0x00, + 0x00, } diff --git a/api/services/execution/execution.proto b/api/services/execution/execution.proto index 0b2d9210d..d2cc028fd 100644 --- a/api/services/execution/execution.proto +++ b/api/services/execution/execution.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1.services.execution; +package containerd.services.tasks.v1; import "google/protobuf/empty.proto"; import "google/protobuf/any.proto"; @@ -11,31 +11,47 @@ import "github.com/containerd/containerd/api/types/task/task.proto"; import "google/protobuf/timestamp.proto"; service Tasks { - rpc Create(CreateRequest) returns (CreateResponse); - rpc Start(StartRequest) returns (google.protobuf.Empty); - rpc Delete(DeleteRequest) returns (DeleteResponse); + // Create a task. + rpc Create(CreateTaskRequest) returns (CreateTaskResponse); + + // Start a task. + rpc Start(StartTaskRequest) returns (google.protobuf.Empty); + + // Delete a task and on disk state. + rpc Delete(DeleteTaskRequest) returns (DeleteResponse); + rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse); - rpc Info(InfoRequest) returns (InfoResponse); - rpc List(ListRequest) returns (ListResponse); + + rpc Get(GetTaskRequest) returns (GetTaskResponse); + + rpc List(ListTasksRequest) returns (ListTasksResponse); + + // Kill a task or process. rpc Kill(KillRequest) returns (google.protobuf.Empty); - rpc Events(EventsRequest) returns (stream containerd.v1.types.Event); - rpc Exec(ExecRequest) returns (ExecResponse); - rpc Pty(PtyRequest) returns (google.protobuf.Empty); - rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty); - rpc Pause(PauseRequest) returns (google.protobuf.Empty); - rpc Resume(ResumeRequest) returns (google.protobuf.Empty); - rpc Processes(ProcessesRequest) returns (ProcessesResponse); - rpc Checkpoint(CheckpointRequest) returns (CheckpointResponse); + + rpc Exec(ExecProcessRequest) returns (ExecProcessResponse); + + rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty); + + rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty); + + rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty); + + rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty); + + rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse); + + rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse); } -message CreateRequest { +message CreateTaskRequest { + // NOTE: reserve field 1 for task id. + // ContainerID specifies the container to use for creating this task. // // The spec from the provided container id will be used to create the // task associated with this container. Only one task can be run at a time // per container. - // - // This should be created using the Containers service. string container_id = 2; // RootFS provides the pre-chroot mounts to perform in the shim before @@ -46,15 +62,15 @@ message CreateRequest { // the container object. repeated containerd.v1.types.Mount rootfs = 3; - string stdin = 5; - string stdout = 6; - string stderr = 7; - bool terminal = 8; + string stdin = 4; + string stdout = 5; + string stderr = 6; + bool terminal = 7; - types.Descriptor checkpoint = 9; + containerd.v1.types.Descriptor checkpoint = 8; } -message CreateResponse { +message CreateTaskResponse { // TODO(stevvooe): We no longer have an id for a task since they are bound // to a single container. Although, we should represent each new task with // an ID so one can differentiate between each instance of a container @@ -68,11 +84,11 @@ message CreateResponse { uint32 pid = 3; } -message StartRequest { +message StartTaskRequest { string container_id = 1; } -message DeleteRequest { +message DeleteTaskRequest { string container_id = 1; } @@ -87,18 +103,19 @@ message DeleteProcessRequest { uint32 pid = 2; } -message InfoRequest { +message GetTaskRequest { string container_id = 1; } -message InfoResponse { - types.Task task = 1; +message GetTaskResponse { + containerd.v1.types.Task task = 1; } -message ListRequest { +message ListTasksRequest { + string filter = 1; } -message ListResponse { +message ListTasksResponse { repeated containerd.v1.types.Task tasks = 1; } @@ -111,16 +128,14 @@ message KillRequest { } } -message EventsRequest { -} - -message ExecRequest { +message ExecProcessRequest { // ContainerID specifies the container in which to exec the process. string container_id = 1; - bool terminal = 2; - string stdin = 3; - string stdout = 4; - string stderr = 5; + + string stdin = 2; + string stdout = 3; + string stderr = 4; + bool terminal = 5; // Spec for starting a process in the target container. // @@ -128,49 +143,45 @@ message ExecRequest { google.protobuf.Any spec = 6; } -message ExecResponse { +message ExecProcessResponse { uint32 pid = 1; } -message PtyRequest { +message ResizePtyRequest { string container_id = 1; uint32 pid = 2; uint32 width = 3; uint32 height = 4; } -message CloseStdinRequest { +message CloseIORequest { string container_id = 1; uint32 pid = 2; + bool stdin = 3; } -message PauseRequest { +message PauseTaskRequest { string container_id = 1; } -message ResumeRequest { +message ResumeTaskRequest { string container_id = 1; } -message ProcessesRequest { +message ListProcessesRequest { string container_id = 1; } -message ProcessesResponse{ +message ListProcessesResponse{ repeated containerd.v1.types.Process processes = 1; } -message CheckpointRequest { +message CheckpointTaskRequest { string container_id = 1; - bool allow_tcp = 2; - bool allow_unix_sockets = 3; - bool allow_terminal = 4; - bool file_locks = 5; - repeated string empty_namespaces = 6; - string parent_checkpoint = 7 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; - bool exit = 8; + string parent_checkpoint = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; + map options = 3; } -message CheckpointResponse { - repeated types.Descriptor descriptors = 1; +message CheckpointTaskResponse { + repeated containerd.v1.types.Descriptor descriptors = 1; } diff --git a/api/services/images/images.pb.go b/api/services/images/images.pb.go index 451a9a1d1..5f82fd7e8 100644 --- a/api/services/images/images.pb.go +++ b/api/services/images/images.pb.go @@ -10,12 +10,13 @@ It has these top-level messages: Image - GetRequest - GetResponse - PutRequest - ListRequest - ListResponse - DeleteRequest + GetImageRequest + GetImageResponse + UpdateImageRequest + UpdateImageResponse + ListImagesRequest + ListImagesResponse + DeleteImageRequest */ package images @@ -24,8 +25,7 @@ import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" import google_protobuf1 "github.com/golang/protobuf/ptypes/empty" -import _ "github.com/containerd/containerd/api/types/mount" -import containerd_v1_types1 "github.com/containerd/containerd/api/types/descriptor" +import containerd_v1_types "github.com/containerd/containerd/api/types/descriptor" import ( context "golang.org/x/net/context" @@ -34,6 +34,7 @@ import ( import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -49,70 +50,80 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type Image struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Labels string `protobuf:"bytes,2,opt,name=labels,proto3" json:"labels,omitempty"` - Target containerd_v1_types1.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Target containerd_v1_types.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"` } func (m *Image) Reset() { *m = Image{} } func (*Image) ProtoMessage() {} func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{0} } -type GetRequest struct { +type GetImageRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (*GetRequest) ProtoMessage() {} -func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{1} } +func (m *GetImageRequest) Reset() { *m = GetImageRequest{} } +func (*GetImageRequest) ProtoMessage() {} +func (*GetImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{1} } -type GetResponse struct { +type GetImageResponse struct { Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` } -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (*GetResponse) ProtoMessage() {} -func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{2} } +func (m *GetImageResponse) Reset() { *m = GetImageResponse{} } +func (*GetImageResponse) ProtoMessage() {} +func (*GetImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{2} } -type PutRequest struct { +type UpdateImageRequest struct { Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` } -func (m *PutRequest) Reset() { *m = PutRequest{} } -func (*PutRequest) ProtoMessage() {} -func (*PutRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{3} } +func (m *UpdateImageRequest) Reset() { *m = UpdateImageRequest{} } +func (*UpdateImageRequest) ProtoMessage() {} +func (*UpdateImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{3} } -type ListRequest struct { +type UpdateImageResponse struct { + Image Image `protobuf:"bytes,1,opt,name=image" json:"image"` } -func (m *ListRequest) Reset() { *m = ListRequest{} } -func (*ListRequest) ProtoMessage() {} -func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{4} } +func (m *UpdateImageResponse) Reset() { *m = UpdateImageResponse{} } +func (*UpdateImageResponse) ProtoMessage() {} +func (*UpdateImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{4} } -type ListResponse struct { +type ListImagesRequest struct { + Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} } +func (*ListImagesRequest) ProtoMessage() {} +func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{5} } + +type ListImagesResponse struct { Images []Image `protobuf:"bytes,1,rep,name=images" json:"images"` } -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (*ListResponse) ProtoMessage() {} -func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{5} } +func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} } +func (*ListImagesResponse) ProtoMessage() {} +func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{6} } -type DeleteRequest struct { +type DeleteImageRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } -func (*DeleteRequest) ProtoMessage() {} -func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{6} } +func (m *DeleteImageRequest) Reset() { *m = DeleteImageRequest{} } +func (*DeleteImageRequest) ProtoMessage() {} +func (*DeleteImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{7} } func init() { - proto.RegisterType((*Image)(nil), "containerd.v1.Image") - proto.RegisterType((*GetRequest)(nil), "containerd.v1.GetRequest") - proto.RegisterType((*GetResponse)(nil), "containerd.v1.GetResponse") - proto.RegisterType((*PutRequest)(nil), "containerd.v1.PutRequest") - proto.RegisterType((*ListRequest)(nil), "containerd.v1.ListRequest") - proto.RegisterType((*ListResponse)(nil), "containerd.v1.ListResponse") - proto.RegisterType((*DeleteRequest)(nil), "containerd.v1.DeleteRequest") + proto.RegisterType((*Image)(nil), "containerd.services.images.v1.Image") + proto.RegisterType((*GetImageRequest)(nil), "containerd.services.images.v1.GetImageRequest") + proto.RegisterType((*GetImageResponse)(nil), "containerd.services.images.v1.GetImageResponse") + proto.RegisterType((*UpdateImageRequest)(nil), "containerd.services.images.v1.UpdateImageRequest") + proto.RegisterType((*UpdateImageResponse)(nil), "containerd.services.images.v1.UpdateImageResponse") + proto.RegisterType((*ListImagesRequest)(nil), "containerd.services.images.v1.ListImagesRequest") + proto.RegisterType((*ListImagesResponse)(nil), "containerd.services.images.v1.ListImagesResponse") + proto.RegisterType((*DeleteImageRequest)(nil), "containerd.services.images.v1.DeleteImageRequest") } // Reference imports to suppress errors if they are not otherwise used. @@ -127,14 +138,14 @@ const _ = grpc.SupportPackageIsVersion4 type ImagesClient interface { // Get returns an image by name. - Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) + Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) // List returns a list of all images known to containerd. - List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) - // Put assigns the name to a given target image based on the provided + List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) + // Update assigns the name to a given target image based on the provided // image. - Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) + Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error) // Delete deletes the image by name. - Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) + Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) } type imagesClient struct { @@ -145,36 +156,36 @@ func NewImagesClient(cc *grpc.ClientConn) ImagesClient { return &imagesClient{cc} } -func (c *imagesClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) { - out := new(GetResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Images/Get", in, out, c.cc, opts...) +func (c *imagesClient) Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) { + out := new(GetImageResponse) + err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Get", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *imagesClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { - out := new(ListResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Images/List", in, out, c.cc, opts...) +func (c *imagesClient) List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) { + out := new(ListImagesResponse) + err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/List", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *imagesClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { +func (c *imagesClient) Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error) { + out := new(UpdateImageResponse) + err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Update", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *imagesClient) Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.Images/Put", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *imagesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { - out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.Images/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -185,14 +196,14 @@ func (c *imagesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...gr type ImagesServer interface { // Get returns an image by name. - Get(context.Context, *GetRequest) (*GetResponse, error) + Get(context.Context, *GetImageRequest) (*GetImageResponse, error) // List returns a list of all images known to containerd. - List(context.Context, *ListRequest) (*ListResponse, error) - // Put assigns the name to a given target image based on the provided + List(context.Context, *ListImagesRequest) (*ListImagesResponse, error) + // Update assigns the name to a given target image based on the provided // image. - Put(context.Context, *PutRequest) (*google_protobuf1.Empty, error) + Update(context.Context, *UpdateImageRequest) (*UpdateImageResponse, error) // Delete deletes the image by name. - Delete(context.Context, *DeleteRequest) (*google_protobuf1.Empty, error) + Delete(context.Context, *DeleteImageRequest) (*google_protobuf1.Empty, error) } func RegisterImagesServer(s *grpc.Server, srv ImagesServer) { @@ -200,7 +211,7 @@ func RegisterImagesServer(s *grpc.Server, srv ImagesServer) { } func _Images_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRequest) + in := new(GetImageRequest) if err := dec(in); err != nil { return nil, err } @@ -209,16 +220,16 @@ func _Images_Get_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Images/Get", + FullMethod: "/containerd.services.images.v1.Images/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ImagesServer).Get(ctx, req.(*GetRequest)) + return srv.(ImagesServer).Get(ctx, req.(*GetImageRequest)) } return interceptor(ctx, in, info, handler) } func _Images_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRequest) + in := new(ListImagesRequest) if err := dec(in); err != nil { return nil, err } @@ -227,34 +238,34 @@ func _Images_List_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Images/List", + FullMethod: "/containerd.services.images.v1.Images/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ImagesServer).List(ctx, req.(*ListRequest)) + return srv.(ImagesServer).List(ctx, req.(*ListImagesRequest)) } return interceptor(ctx, in, info, handler) } -func _Images_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PutRequest) +func _Images_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateImageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ImagesServer).Put(ctx, in) + return srv.(ImagesServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Images/Put", + FullMethod: "/containerd.services.images.v1.Images/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ImagesServer).Put(ctx, req.(*PutRequest)) + return srv.(ImagesServer).Update(ctx, req.(*UpdateImageRequest)) } return interceptor(ctx, in, info, handler) } func _Images_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRequest) + in := new(DeleteImageRequest) if err := dec(in); err != nil { return nil, err } @@ -263,16 +274,16 @@ func _Images_Delete_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Images/Delete", + FullMethod: "/containerd.services.images.v1.Images/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ImagesServer).Delete(ctx, req.(*DeleteRequest)) + return srv.(ImagesServer).Delete(ctx, req.(*DeleteImageRequest)) } return interceptor(ctx, in, info, handler) } var _Images_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.Images", + ServiceName: "containerd.services.images.v1.Images", HandlerType: (*ImagesServer)(nil), Methods: []grpc.MethodDesc{ { @@ -284,8 +295,8 @@ var _Images_serviceDesc = grpc.ServiceDesc{ Handler: _Images_List_Handler, }, { - MethodName: "Put", - Handler: _Images_Put_Handler, + MethodName: "Update", + Handler: _Images_Update_Handler, }, { MethodName: "Delete", @@ -318,10 +329,21 @@ func (m *Image) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintImages(dAtA, i, uint64(len(m.Labels))) - i += copy(dAtA[i:], m.Labels) + for k, _ := range m.Labels { + dAtA[i] = 0x12 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovImages(uint64(len(k))) + 1 + len(v) + sovImages(uint64(len(v))) + i = encodeVarintImages(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintImages(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintImages(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } } dAtA[i] = 0x1a i++ @@ -334,7 +356,7 @@ func (m *Image) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *GetRequest) Marshal() (dAtA []byte, err error) { +func (m *GetImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -344,7 +366,7 @@ func (m *GetRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -358,7 +380,7 @@ func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *GetResponse) Marshal() (dAtA []byte, err error) { +func (m *GetImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -368,7 +390,7 @@ func (m *GetResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetImageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -386,7 +408,7 @@ func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *PutRequest) Marshal() (dAtA []byte, err error) { +func (m *UpdateImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -396,7 +418,7 @@ func (m *PutRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PutRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *UpdateImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -412,7 +434,7 @@ func (m *PutRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ListRequest) Marshal() (dAtA []byte, err error) { +func (m *UpdateImageResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -422,15 +444,23 @@ func (m *ListRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *UpdateImageResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintImages(dAtA, i, uint64(m.Image.Size())) + n4, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 return i, nil } -func (m *ListResponse) Marshal() (dAtA []byte, err error) { +func (m *ListImagesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -440,7 +470,31 @@ func (m *ListResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Filter) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintImages(dAtA, i, uint64(len(m.Filter))) + i += copy(dAtA[i:], m.Filter) + } + return i, nil +} + +func (m *ListImagesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -460,7 +514,7 @@ func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { +func (m *DeleteImageRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -470,7 +524,7 @@ func (m *DeleteRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *DeleteImageRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -518,16 +572,20 @@ func (m *Image) Size() (n int) { if l > 0 { n += 1 + l + sovImages(uint64(l)) } - l = len(m.Labels) - if l > 0 { - n += 1 + l + sovImages(uint64(l)) + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovImages(uint64(len(k))) + 1 + len(v) + sovImages(uint64(len(v))) + n += mapEntrySize + 1 + sovImages(uint64(mapEntrySize)) + } } l = m.Target.Size() n += 1 + l + sovImages(uint64(l)) return n } -func (m *GetRequest) Size() (n int) { +func (m *GetImageRequest) Size() (n int) { var l int _ = l l = len(m.Name) @@ -537,7 +595,7 @@ func (m *GetRequest) Size() (n int) { return n } -func (m *GetResponse) Size() (n int) { +func (m *GetImageResponse) Size() (n int) { var l int _ = l if m.Image != nil { @@ -547,7 +605,7 @@ func (m *GetResponse) Size() (n int) { return n } -func (m *PutRequest) Size() (n int) { +func (m *UpdateImageRequest) Size() (n int) { var l int _ = l l = m.Image.Size() @@ -555,13 +613,25 @@ func (m *PutRequest) Size() (n int) { return n } -func (m *ListRequest) Size() (n int) { +func (m *UpdateImageResponse) Size() (n int) { var l int _ = l + l = m.Image.Size() + n += 1 + l + sovImages(uint64(l)) return n } -func (m *ListResponse) Size() (n int) { +func (m *ListImagesRequest) Size() (n int) { + var l int + _ = l + l = len(m.Filter) + if l > 0 { + n += 1 + l + sovImages(uint64(l)) + } + return n +} + +func (m *ListImagesResponse) Size() (n int) { var l int _ = l if len(m.Images) > 0 { @@ -573,7 +643,7 @@ func (m *ListResponse) Size() (n int) { return n } -func (m *DeleteRequest) Size() (n int) { +func (m *DeleteImageRequest) Size() (n int) { var l int _ = l l = len(m.Name) @@ -600,68 +670,89 @@ func (this *Image) String() string { if this == nil { return "nil" } + keysForLabels := make([]string, 0, len(this.Labels)) + for k, _ := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" s := strings.Join([]string{`&Image{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Labels:` + fmt.Sprintf("%v", this.Labels) + `,`, - `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "containerd_v1_types1.Descriptor", 1), `&`, ``, 1) + `,`, + `Labels:` + mapStringForLabels + `,`, + `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "containerd_v1_types.Descriptor", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *GetRequest) String() string { +func (this *GetImageRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetRequest{`, + s := strings.Join([]string{`&GetImageRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") return s } -func (this *GetResponse) String() string { +func (this *GetImageResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&GetResponse{`, + s := strings.Join([]string{`&GetImageResponse{`, `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, `}`, }, "") return s } -func (this *PutRequest) String() string { +func (this *UpdateImageRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PutRequest{`, + s := strings.Join([]string{`&UpdateImageRequest{`, `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *ListRequest) String() string { +func (this *UpdateImageResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListRequest{`, + s := strings.Join([]string{`&UpdateImageResponse{`, + `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *ListResponse) String() string { +func (this *ListImagesRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListResponse{`, + s := strings.Join([]string{`&ListImagesRequest{`, + `Filter:` + fmt.Sprintf("%v", this.Filter) + `,`, + `}`, + }, "") + return s +} +func (this *ListImagesResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListImagesResponse{`, `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *DeleteRequest) String() string { +func (this *DeleteImageRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&DeleteRequest{`, + s := strings.Join([]string{`&DeleteImageRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `}`, }, "") @@ -737,7 +828,7 @@ func (m *Image) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImages @@ -747,20 +838,107 @@ func (m *Image) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthImages } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = string(dAtA[iNdEx:postIndex]) + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthImages + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthImages + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } iNdEx = postIndex case 3: if wireType != 2 { @@ -813,7 +991,7 @@ func (m *Image) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetRequest) Unmarshal(dAtA []byte) error { +func (m *GetImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -836,10 +1014,10 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: GetImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -892,7 +1070,7 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *GetResponse) Unmarshal(dAtA []byte) error { +func (m *GetImageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -915,10 +1093,10 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: GetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: GetImageResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: GetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: GetImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -975,7 +1153,7 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *PutRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -998,10 +1176,10 @@ func (m *PutRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PutRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PutRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1055,7 +1233,7 @@ func (m *PutRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListRequest) Unmarshal(dAtA []byte) error { +func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1078,12 +1256,42 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: UpdateImageResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: UpdateImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthImages + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipImages(dAtA[iNdEx:]) @@ -1105,7 +1313,7 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListResponse) Unmarshal(dAtA []byte) error { +func (m *ListImagesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1128,10 +1336,89 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ListImagesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListImagesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthImages + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Filter = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipImages(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthImages + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListImagesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImages + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListImagesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListImagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1186,7 +1473,7 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteRequest) Unmarshal(dAtA []byte) error { +func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1209,10 +1496,10 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DeleteRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeleteImageRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeleteImageRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1375,32 +1662,38 @@ func init() { } var fileDescriptorImages = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6f, 0x94, 0x40, - 0x14, 0xde, 0xe9, 0x6e, 0x49, 0x7c, 0xb8, 0x97, 0x49, 0xd3, 0x20, 0x35, 0x94, 0xe0, 0xa5, 0xf1, - 0x30, 0x28, 0x5e, 0x34, 0xa9, 0x35, 0x6e, 0xaa, 0x8d, 0x89, 0x87, 0x86, 0x7f, 0x00, 0xf4, 0x89, - 0x24, 0xc0, 0x20, 0x33, 0x34, 0xe9, 0x4d, 0xff, 0xdd, 0x1e, 0x3d, 0x7a, 0x32, 0x96, 0x5f, 0x62, - 0x98, 0x99, 0xee, 0x6e, 0x71, 0xd5, 0xf6, 0x02, 0xef, 0xcd, 0xfb, 0xbe, 0xef, 0xbd, 0xef, 0xe5, - 0xc1, 0xdb, 0xbc, 0x90, 0x9f, 0xbb, 0x94, 0x65, 0xbc, 0x0a, 0x33, 0x5e, 0xcb, 0xa4, 0xa8, 0xb1, - 0xbd, 0xd8, 0x0c, 0x93, 0xa6, 0x08, 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3, 0x19, 0xfe, 0x1c, - 0xec, 0x8f, 0x85, 0xb8, 0x11, 0x08, 0x16, 0xf0, 0x50, 0xa7, 0x66, 0x94, 0x08, 0x2c, 0x7d, 0x07, - 0x0e, 0xf1, 0xa7, 0xff, 0x51, 0x34, 0xc8, 0xe0, 0x09, 0xcc, 0x4f, 0xb1, 0x44, 0x89, 0xff, 0xb0, - 0x1c, 0x7d, 0xdb, 0x01, 0x4b, 0x91, 0x05, 0x3d, 0x86, 0xe9, 0x19, 0x4a, 0xfa, 0x68, 0x24, 0xbd, - 0xde, 0x99, 0xeb, 0x6e, 0x2b, 0x99, 0x09, 0xdf, 0xc0, 0x6c, 0x98, 0x98, 0x8e, 0x31, 0x1b, 0xae, - 0xdc, 0x83, 0xad, 0x35, 0x23, 0xf0, 0x12, 0xa6, 0xe7, 0xdd, 0x9f, 0xed, 0xd7, 0x5b, 0x75, 0xf7, - 0x99, 0x3e, 0x6c, 0x76, 0x73, 0xd8, 0xec, 0xdd, 0x70, 0xd8, 0xf4, 0x04, 0x2c, 0x6d, 0x94, 0x3e, - 0x1e, 0x91, 0x6f, 0xf9, 0xff, 0x1b, 0x7f, 0xe1, 0x2c, 0xaf, 0xbd, 0xc9, 0x8f, 0x6b, 0x6f, 0xf2, - 0xb5, 0xf7, 0xc8, 0xb2, 0xf7, 0xc8, 0xf7, 0xde, 0x23, 0xbf, 0x7a, 0x8f, 0xa4, 0x96, 0x42, 0xbe, - 0xf8, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xe2, 0xcf, 0xa0, 0xba, 0x03, 0x00, 0x00, + // 513 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40, + 0x10, 0xed, 0xe6, 0xc3, 0x12, 0x93, 0x03, 0x65, 0xa9, 0x2a, 0xcb, 0x08, 0x37, 0xb2, 0x40, 0x8a, + 0x84,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0x7c, + 0xab, 0x83, 0xa5, 0x0d, 0xd0, 0x11, 0xd4, 0x4f, 0x50, 0x52, 0xb6, 0xa6, 0xdf, 0xb5, 0x73, 0xe0, + 0xf8, 0x1b, 0xe3, 0xcd, 0x80, 0x67, 0xd0, 0x28, 0xc7, 0xa6, 0xeb, 0xfe, 0x83, 0x95, 0x20, 0x9d, + 0xee, 0x16, 0x0c, 0xd3, 0x8c, 0x83, 0xa5, 0x77, 0x9a, 0xae, 0x23, 0xaf, 0x1e, 0x34, 0x27, 0xd8, + 0x86, 0x62, 0x1a, 0xbe, 0x03, 0x4b, 0x47, 0xbf, 0xb6, 0xe1, 0xea, 0x0e, 0x39, 0xfb, 0x4c, 0x5f, + 0x57, 0x6c, 0x79, 0x5d, 0xb1, 0xe3, 0xf2, 0xba, 0xea, 0xd9, 0xf3, 0x73, 0x77, 0xe7, 0xc7, 0xb9, + 0xbb, 0xf3, 0x75, 0xe1, 0x92, 0xf9, 0xc2, 0x25, 0xdf, 0x17, 0x2e, 0xf9, 0xbd, 0x70, 0x49, 0xdf, + 0x52, 0xc8, 0x27, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, 0x19, 0x85, 0xd6, 0x60, 0x05, 0x00, + 0x00, } diff --git a/api/services/images/images.proto b/api/services/images/images.proto index 176caccb6..a1ceb7203 100644 --- a/api/services/images/images.proto +++ b/api/services/images/images.proto @@ -1,10 +1,9 @@ syntax = "proto3"; -package containerd.v1; +package containerd.services.images.v1; import "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; -import "github.com/containerd/containerd/api/types/mount/mount.proto"; import "github.com/containerd/containerd/api/types/descriptor/descriptor.proto"; // Images is a service that allows one to register images with containerd. @@ -20,59 +19,49 @@ import "github.com/containerd/containerd/api/types/descriptor/descriptor.proto"; // As such, this can really be considered a "metadata service". service Images { // Get returns an image by name. - rpc Get(GetRequest) returns (GetResponse); + rpc Get(GetImageRequest) returns (GetImageResponse); // List returns a list of all images known to containerd. - rpc List(ListRequest) returns (ListResponse); + rpc List(ListImagesRequest) returns (ListImagesResponse); - // Put assigns the name to a given target image based on the provided + // Update assigns the name to a given target image based on the provided // image. - rpc Put(PutRequest) returns (google.protobuf.Empty); + rpc Update(UpdateImageRequest) returns (UpdateImageResponse); // Delete deletes the image by name. - rpc Delete(DeleteRequest) returns (google.protobuf.Empty); + rpc Delete(DeleteImageRequest) returns (google.protobuf.Empty); } message Image { string name = 1; - string labels = 2; - types.Descriptor target = 3 [(gogoproto.nullable) = false]; + map labels = 2; + containerd.v1.types.Descriptor target = 3 [(gogoproto.nullable) = false]; } -message GetRequest { +message GetImageRequest { string name = 1; - - // TODO(stevvooe): Consider that we may want to have multiple images under - // the same name or multiple names for the same image. This mapping could - // be truly many to many but we'll need a way to identify an entry. - // - // For now, we consider it unique but an intermediary index could be - // created to allow for a dispatch of images. } -message GetResponse { +message GetImageResponse { Image image = 1; } -message PutRequest { +message UpdateImageRequest { Image image = 1 [(gogoproto.nullable) = false]; } -message ListRequest { - // TODO(stevvooe): empty for now, need to ad filtration - // Some common use cases we might consider: - // - // 1. Select by multiple names. - // 2. Select by platform. - // 3. Select by annotations. +message UpdateImageResponse { + Image image = 1 [(gogoproto.nullable) = false]; } -message ListResponse { +message ListImagesRequest { + string filter = 1; +} + +message ListImagesResponse { repeated Image images = 1 [(gogoproto.nullable) = false]; - - // TODO(stevvooe): Add pagination. } -message DeleteRequest { +message DeleteImageRequest { string name = 1; } diff --git a/api/services/namespaces/namespace.pb.go b/api/services/namespaces/namespace.pb.go index 28a9e3db4..f791d85b7 100644 --- a/api/services/namespaces/namespace.pb.go +++ b/api/services/namespaces/namespace.pb.go @@ -152,16 +152,16 @@ func (*DeleteNamespaceRequest) ProtoMessage() {} func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{9} } func init() { - proto.RegisterType((*Namespace)(nil), "containerd.v1.namespaces.Namespace") - proto.RegisterType((*GetNamespaceRequest)(nil), "containerd.v1.namespaces.GetNamespaceRequest") - proto.RegisterType((*GetNamespaceResponse)(nil), "containerd.v1.namespaces.GetNamespaceResponse") - proto.RegisterType((*ListNamespacesRequest)(nil), "containerd.v1.namespaces.ListNamespacesRequest") - proto.RegisterType((*ListNamespacesResponse)(nil), "containerd.v1.namespaces.ListNamespacesResponse") - proto.RegisterType((*CreateNamespaceRequest)(nil), "containerd.v1.namespaces.CreateNamespaceRequest") - proto.RegisterType((*CreateNamespaceResponse)(nil), "containerd.v1.namespaces.CreateNamespaceResponse") - proto.RegisterType((*UpdateNamespaceRequest)(nil), "containerd.v1.namespaces.UpdateNamespaceRequest") - proto.RegisterType((*UpdateNamespaceResponse)(nil), "containerd.v1.namespaces.UpdateNamespaceResponse") - proto.RegisterType((*DeleteNamespaceRequest)(nil), "containerd.v1.namespaces.DeleteNamespaceRequest") + proto.RegisterType((*Namespace)(nil), "containerd.services.namespaces.v1.Namespace") + proto.RegisterType((*GetNamespaceRequest)(nil), "containerd.services.namespaces.v1.GetNamespaceRequest") + proto.RegisterType((*GetNamespaceResponse)(nil), "containerd.services.namespaces.v1.GetNamespaceResponse") + proto.RegisterType((*ListNamespacesRequest)(nil), "containerd.services.namespaces.v1.ListNamespacesRequest") + proto.RegisterType((*ListNamespacesResponse)(nil), "containerd.services.namespaces.v1.ListNamespacesResponse") + proto.RegisterType((*CreateNamespaceRequest)(nil), "containerd.services.namespaces.v1.CreateNamespaceRequest") + proto.RegisterType((*CreateNamespaceResponse)(nil), "containerd.services.namespaces.v1.CreateNamespaceResponse") + proto.RegisterType((*UpdateNamespaceRequest)(nil), "containerd.services.namespaces.v1.UpdateNamespaceRequest") + proto.RegisterType((*UpdateNamespaceResponse)(nil), "containerd.services.namespaces.v1.UpdateNamespaceResponse") + proto.RegisterType((*DeleteNamespaceRequest)(nil), "containerd.services.namespaces.v1.DeleteNamespaceRequest") } // Reference imports to suppress errors if they are not otherwise used. @@ -192,7 +192,7 @@ func NewNamespacesClient(cc *grpc.ClientConn) NamespacesClient { func (c *namespacesClient) Get(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { out := new(GetNamespaceResponse) - err := grpc.Invoke(ctx, "/containerd.v1.namespaces.Namespaces/Get", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Get", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -201,7 +201,7 @@ func (c *namespacesClient) Get(ctx context.Context, in *GetNamespaceRequest, opt func (c *namespacesClient) List(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { out := new(ListNamespacesResponse) - err := grpc.Invoke(ctx, "/containerd.v1.namespaces.Namespaces/List", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/List", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -210,7 +210,7 @@ func (c *namespacesClient) List(ctx context.Context, in *ListNamespacesRequest, func (c *namespacesClient) Create(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { out := new(CreateNamespaceResponse) - err := grpc.Invoke(ctx, "/containerd.v1.namespaces.Namespaces/Create", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Create", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -219,7 +219,7 @@ func (c *namespacesClient) Create(ctx context.Context, in *CreateNamespaceReques func (c *namespacesClient) Update(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { out := new(UpdateNamespaceResponse) - err := grpc.Invoke(ctx, "/containerd.v1.namespaces.Namespaces/Update", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Update", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -228,7 +228,7 @@ func (c *namespacesClient) Update(ctx context.Context, in *UpdateNamespaceReques func (c *namespacesClient) Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.namespaces.Namespaces/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -259,7 +259,7 @@ func _Namespaces_Get_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.namespaces.Namespaces/Get", + FullMethod: "/containerd.services.namespaces.v1.Namespaces/Get", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Get(ctx, req.(*GetNamespaceRequest)) @@ -277,7 +277,7 @@ func _Namespaces_List_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.namespaces.Namespaces/List", + FullMethod: "/containerd.services.namespaces.v1.Namespaces/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).List(ctx, req.(*ListNamespacesRequest)) @@ -295,7 +295,7 @@ func _Namespaces_Create_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.namespaces.Namespaces/Create", + FullMethod: "/containerd.services.namespaces.v1.Namespaces/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Create(ctx, req.(*CreateNamespaceRequest)) @@ -313,7 +313,7 @@ func _Namespaces_Update_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.namespaces.Namespaces/Update", + FullMethod: "/containerd.services.namespaces.v1.Namespaces/Update", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Update(ctx, req.(*UpdateNamespaceRequest)) @@ -331,7 +331,7 @@ func _Namespaces_Delete_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.namespaces.Namespaces/Delete", + FullMethod: "/containerd.services.namespaces.v1.Namespaces/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(NamespacesServer).Delete(ctx, req.(*DeleteNamespaceRequest)) @@ -340,7 +340,7 @@ func _Namespaces_Delete_Handler(srv interface{}, ctx context.Context, dec func(i } var _Namespaces_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.namespaces.Namespaces", + ServiceName: "containerd.services.namespaces.v1.Namespaces", HandlerType: (*NamespacesServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1971,38 +1971,39 @@ func init() { } var fileDescriptorNamespace = []byte{ - // 528 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xbd, 0x8e, 0xd3, 0x4c, - 0x14, 0xcd, 0x24, 0xf9, 0x2c, 0xe5, 0xba, 0xf9, 0x34, 0x04, 0x63, 0x19, 0xc9, 0x44, 0xa6, 0x59, - 0x24, 0x18, 0xb3, 0xa1, 0xe1, 0xa7, 0x5b, 0x58, 0x02, 0xd2, 0x42, 0x61, 0x89, 0x7a, 0x35, 0x4e, - 0x26, 0xc6, 0x8a, 0xff, 0xf0, 0x8c, 0x23, 0xa5, 0xe3, 0x0d, 0x78, 0x03, 0x1a, 0x5e, 0x26, 0x25, - 0x25, 0x15, 0x62, 0xf3, 0x24, 0xc8, 0x63, 0x27, 0xce, 0x6e, 0x1c, 0x2b, 0x2b, 0x85, 0xee, 0x8e, - 0x7d, 0x8e, 0xcf, 0xb9, 0xd7, 0xe7, 0x0e, 0xbc, 0xf3, 0x7c, 0xf1, 0x39, 0x73, 0xc9, 0x38, 0x0e, - 0xed, 0x71, 0x1c, 0x09, 0xea, 0x47, 0x2c, 0x9d, 0x6c, 0x97, 0x34, 0xf1, 0x6d, 0xce, 0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ba, 0x49, 0xae, 0x3e, 0x0d, - 0x86, 0xb6, 0x93, 0xd9, 0xf3, 0xfc, 0xee, 0x3f, 0xd3, 0x97, 0x57, 0x66, 0xeb, 0xd7, 0x95, 0xd9, - 0xfa, 0xba, 0x32, 0xd1, 0x72, 0x65, 0xa2, 0x9f, 0x2b, 0x13, 0xfd, 0x59, 0x99, 0xc8, 0x55, 0x24, - 0xf2, 0xd9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x2e, 0xc3, 0x29, 0xaf, 0x06, 0x00, 0x00, + // 536 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xcd, 0x26, 0x21, 0x52, 0xc6, 0x17, 0xb4, 0x04, 0x63, 0x19, 0xc9, 0x04, 0x9f, 0x8a, 0x54, + 0xad, 0x45, 0x90, 0xa0, 0x2d, 0xb7, 0x42, 0x29, 0x87, 0x82, 0x90, 0x25, 0x4e, 0x1c, 0x90, 0x93, + 0x4c, 0x5c, 0x13, 0xc7, 0x36, 0xde, 0x75, 0xa4, 0x88, 0x03, 0xfc, 0x0d, 0x17, 0x3e, 0x24, 0x47, + 0x8e, 0x9c, 0x50, 0x9b, 0x2f, 0x41, 0x5e, 0x3b, 0x71, 0xda, 0x18, 0xe1, 0x46, 0xb4, 0xb7, 0x59, + 0xef, 0xcc, 0xbc, 0xb7, 0x4f, 0xef, 0x25, 0xf0, 0xda, 0xf5, 0xc4, 0x69, 0xd2, 0x67, 0x83, 0x70, + 0x62, 0x0d, 0xc2, 0x40, 0x38, 0x5e, 0x80, 0xf1, 0x70, 0xbd, 0x74, 0x22, 0xcf, 0xe2, 0x18, 0x4f, + 0xbd, 0x01, 0x72, 0x2b, 0x70, 0x26, 0xc8, 0x23, 0xe7, 0x42, 0xc9, 0xa2, 0x38, 0x14, 0x21, 0x7d, + 0x58, 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, 0xa5, 0xff, 0x45, 0x87, + 0xda, 0xfc, 0xdc, 0xa8, 0xfd, 0x3a, 0x37, 0x6a, 0xdf, 0x16, 0x06, 0x99, 0x2f, 0x0c, 0xf2, 0x73, + 0x61, 0x90, 0xb3, 0x85, 0x41, 0xfa, 0x2d, 0xd9, 0xf9, 0xe4, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x88, 0x7f, 0xdb, 0x9f, 0x48, 0x07, 0x00, 0x00, } diff --git a/api/services/namespaces/namespace.proto b/api/services/namespaces/namespace.proto index 4927cff85..7e8d378ca 100644 --- a/api/services/namespaces/namespace.proto +++ b/api/services/namespaces/namespace.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1.namespaces; +package containerd.services.namespaces.v1; import "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; @@ -44,7 +44,7 @@ message GetNamespaceResponse { } message ListNamespacesRequest { - string filter = 1; // TODO(stevvooe): Define a filtering syntax to make these queries. + string filter = 1; } message ListNamespacesResponse { diff --git a/api/services/shim/shim.pb.go b/api/services/shim/shim.pb.go index ead02f56c..3a91e3a14 100644 --- a/api/services/shim/shim.pb.go +++ b/api/services/shim/shim.pb.go @@ -54,6 +54,7 @@ import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -252,13 +253,8 @@ func (*ProcessesResponse) ProtoMessage() {} func (*ProcessesResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{19} } type CheckpointRequest struct { - Exit bool `protobuf:"varint,1,opt,name=exit,proto3" json:"exit,omitempty"` - AllowTcp bool `protobuf:"varint,2,opt,name=allow_tcp,json=allowTcp,proto3" json:"allow_tcp,omitempty"` - AllowUnixSockets bool `protobuf:"varint,3,opt,name=allow_unix_sockets,json=allowUnixSockets,proto3" json:"allow_unix_sockets,omitempty"` - AllowTerminal bool `protobuf:"varint,4,opt,name=allow_terminal,json=allowTerminal,proto3" json:"allow_terminal,omitempty"` - FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"` - EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces" json:"empty_namespaces,omitempty"` - CheckpointPath string `protobuf:"bytes,7,opt,name=checkpoint_path,json=checkpointPath,proto3" json:"checkpoint_path,omitempty"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *CheckpointRequest) Reset() { *m = CheckpointRequest{} } @@ -266,27 +262,27 @@ func (*CheckpointRequest) ProtoMessage() {} func (*CheckpointRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{20} } func init() { - proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.shim.CreateRequest") - proto.RegisterType((*CreateResponse)(nil), "containerd.v1.services.shim.CreateResponse") - proto.RegisterType((*StartRequest)(nil), "containerd.v1.services.shim.StartRequest") - proto.RegisterType((*DeleteRequest)(nil), "containerd.v1.services.shim.DeleteRequest") - proto.RegisterType((*DeleteResponse)(nil), "containerd.v1.services.shim.DeleteResponse") - proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.v1.services.shim.DeleteProcessRequest") - proto.RegisterType((*ExecRequest)(nil), "containerd.v1.services.shim.ExecRequest") - proto.RegisterType((*Rlimit)(nil), "containerd.v1.services.shim.Rlimit") - proto.RegisterType((*ExecResponse)(nil), "containerd.v1.services.shim.ExecResponse") - proto.RegisterType((*PtyRequest)(nil), "containerd.v1.services.shim.PtyRequest") - proto.RegisterType((*EventsRequest)(nil), "containerd.v1.services.shim.EventsRequest") - proto.RegisterType((*StateRequest)(nil), "containerd.v1.services.shim.StateRequest") - proto.RegisterType((*StateResponse)(nil), "containerd.v1.services.shim.StateResponse") - proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.shim.PauseRequest") - proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.shim.ResumeRequest") - proto.RegisterType((*ExitRequest)(nil), "containerd.v1.services.shim.ExitRequest") - proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.shim.KillRequest") - proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.shim.CloseStdinRequest") - proto.RegisterType((*ProcessesRequest)(nil), "containerd.v1.services.shim.ProcessesRequest") - proto.RegisterType((*ProcessesResponse)(nil), "containerd.v1.services.shim.ProcessesResponse") - proto.RegisterType((*CheckpointRequest)(nil), "containerd.v1.services.shim.CheckpointRequest") + proto.RegisterType((*CreateRequest)(nil), "containerd.runtime.linux.shim.v1.CreateRequest") + proto.RegisterType((*CreateResponse)(nil), "containerd.runtime.linux.shim.v1.CreateResponse") + proto.RegisterType((*StartRequest)(nil), "containerd.runtime.linux.shim.v1.StartRequest") + proto.RegisterType((*DeleteRequest)(nil), "containerd.runtime.linux.shim.v1.DeleteRequest") + proto.RegisterType((*DeleteResponse)(nil), "containerd.runtime.linux.shim.v1.DeleteResponse") + proto.RegisterType((*DeleteProcessRequest)(nil), "containerd.runtime.linux.shim.v1.DeleteProcessRequest") + proto.RegisterType((*ExecRequest)(nil), "containerd.runtime.linux.shim.v1.ExecRequest") + proto.RegisterType((*Rlimit)(nil), "containerd.runtime.linux.shim.v1.Rlimit") + proto.RegisterType((*ExecResponse)(nil), "containerd.runtime.linux.shim.v1.ExecResponse") + proto.RegisterType((*PtyRequest)(nil), "containerd.runtime.linux.shim.v1.PtyRequest") + proto.RegisterType((*EventsRequest)(nil), "containerd.runtime.linux.shim.v1.EventsRequest") + proto.RegisterType((*StateRequest)(nil), "containerd.runtime.linux.shim.v1.StateRequest") + proto.RegisterType((*StateResponse)(nil), "containerd.runtime.linux.shim.v1.StateResponse") + proto.RegisterType((*PauseRequest)(nil), "containerd.runtime.linux.shim.v1.PauseRequest") + proto.RegisterType((*ResumeRequest)(nil), "containerd.runtime.linux.shim.v1.ResumeRequest") + proto.RegisterType((*ExitRequest)(nil), "containerd.runtime.linux.shim.v1.ExitRequest") + proto.RegisterType((*KillRequest)(nil), "containerd.runtime.linux.shim.v1.KillRequest") + proto.RegisterType((*CloseStdinRequest)(nil), "containerd.runtime.linux.shim.v1.CloseStdinRequest") + proto.RegisterType((*ProcessesRequest)(nil), "containerd.runtime.linux.shim.v1.ProcessesRequest") + proto.RegisterType((*ProcessesResponse)(nil), "containerd.runtime.linux.shim.v1.ProcessesResponse") + proto.RegisterType((*CheckpointRequest)(nil), "containerd.runtime.linux.shim.v1.CheckpointRequest") } // Reference imports to suppress errors if they are not otherwise used. @@ -327,7 +323,7 @@ func NewShimClient(cc *grpc.ClientConn) ShimClient { func (c *shimClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) { out := new(CreateResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Create", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Create", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -336,7 +332,7 @@ func (c *shimClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc func (c *shimClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Start", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Start", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -345,7 +341,7 @@ func (c *shimClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.C func (c *shimClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Delete", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Delete", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -354,7 +350,7 @@ func (c *shimClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc func (c *shimClient) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) { out := new(DeleteResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/DeleteProcess", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/DeleteProcess", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -363,7 +359,7 @@ func (c *shimClient) DeleteProcess(ctx context.Context, in *DeleteProcessRequest func (c *shimClient) State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) { out := new(StateResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/State", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/State", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -372,7 +368,7 @@ func (c *shimClient) State(ctx context.Context, in *StateRequest, opts ...grpc.C func (c *shimClient) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error) { out := new(ProcessesResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Processes", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Processes", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -381,7 +377,7 @@ func (c *shimClient) Processes(ctx context.Context, in *ProcessesRequest, opts . func (c *shimClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Pause", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Pause", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -390,7 +386,7 @@ func (c *shimClient) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.C func (c *shimClient) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Resume", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Resume", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -399,7 +395,7 @@ func (c *shimClient) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc func (c *shimClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Checkpoint", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Checkpoint", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -408,7 +404,7 @@ func (c *shimClient) Checkpoint(ctx context.Context, in *CheckpointRequest, opts func (c *shimClient) Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Exit", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Exit", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -416,7 +412,7 @@ func (c *shimClient) Exit(ctx context.Context, in *ExitRequest, opts ...grpc.Cal } func (c *shimClient) Events(ctx context.Context, in *EventsRequest, opts ...grpc.CallOption) (Shim_EventsClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Shim_serviceDesc.Streams[0], c.cc, "/containerd.v1.services.shim.Shim/Events", opts...) + stream, err := grpc.NewClientStream(ctx, &_Shim_serviceDesc.Streams[0], c.cc, "/containerd.runtime.linux.shim.v1.Shim/Events", opts...) if err != nil { return nil, err } @@ -449,7 +445,7 @@ func (x *shimEventsClient) Recv() (*containerd_v1_types1.Event, error) { func (c *shimClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Kill", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Kill", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -458,7 +454,7 @@ func (c *shimClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.Cal func (c *shimClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.CallOption) (*ExecResponse, error) { out := new(ExecResponse) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Exec", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Exec", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -467,7 +463,7 @@ func (c *shimClient) Exec(ctx context.Context, in *ExecRequest, opts ...grpc.Cal func (c *shimClient) Pty(ctx context.Context, in *PtyRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Pty", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/Pty", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -476,7 +472,7 @@ func (c *shimClient) Pty(ctx context.Context, in *PtyRequest, opts ...grpc.CallO func (c *shimClient) CloseStdin(ctx context.Context, in *CloseStdinRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/CloseStdin", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.runtime.linux.shim.v1.Shim/CloseStdin", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -517,7 +513,7 @@ func _Shim_Create_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Create", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Create(ctx, req.(*CreateRequest)) @@ -535,7 +531,7 @@ func _Shim_Start_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Start", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Start", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Start(ctx, req.(*StartRequest)) @@ -553,7 +549,7 @@ func _Shim_Delete_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Delete", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Delete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Delete(ctx, req.(*DeleteRequest)) @@ -571,7 +567,7 @@ func _Shim_DeleteProcess_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/DeleteProcess", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/DeleteProcess", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).DeleteProcess(ctx, req.(*DeleteProcessRequest)) @@ -589,7 +585,7 @@ func _Shim_State_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/State", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/State", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).State(ctx, req.(*StateRequest)) @@ -607,7 +603,7 @@ func _Shim_Processes_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Processes", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Processes", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Processes(ctx, req.(*ProcessesRequest)) @@ -625,7 +621,7 @@ func _Shim_Pause_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Pause", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Pause", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Pause(ctx, req.(*PauseRequest)) @@ -643,7 +639,7 @@ func _Shim_Resume_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Resume", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Resume", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Resume(ctx, req.(*ResumeRequest)) @@ -661,7 +657,7 @@ func _Shim_Checkpoint_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Checkpoint", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Checkpoint", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Checkpoint(ctx, req.(*CheckpointRequest)) @@ -679,7 +675,7 @@ func _Shim_Exit_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Exit", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Exit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Exit(ctx, req.(*ExitRequest)) @@ -718,7 +714,7 @@ func _Shim_Kill_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Kill", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Kill", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Kill(ctx, req.(*KillRequest)) @@ -736,7 +732,7 @@ func _Shim_Exec_Handler(srv interface{}, ctx context.Context, dec func(interface } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Exec", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Exec", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Exec(ctx, req.(*ExecRequest)) @@ -754,7 +750,7 @@ func _Shim_Pty_Handler(srv interface{}, ctx context.Context, dec func(interface{ } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/Pty", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/Pty", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).Pty(ctx, req.(*PtyRequest)) @@ -772,7 +768,7 @@ func _Shim_CloseStdin_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.services.shim.Shim/CloseStdin", + FullMethod: "/containerd.runtime.linux.shim.v1.Shim/CloseStdin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ShimServer).CloseStdin(ctx, req.(*CloseStdinRequest)) @@ -781,7 +777,7 @@ func _Shim_CloseStdin_Handler(srv interface{}, ctx context.Context, dec func(int } var _Shim_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.services.shim.Shim", + ServiceName: "containerd.runtime.linux.shim.v1.Shim", HandlerType: (*ShimServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1508,77 +1504,29 @@ func (m *CheckpointRequest) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.Exit { - dAtA[i] = 0x8 - i++ - if m.Exit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if len(m.Path) > 0 { + dAtA[i] = 0xa i++ + i = encodeVarintShim(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) } - if m.AllowTcp { - dAtA[i] = 0x10 - i++ - if m.AllowTcp { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.AllowUnixSockets { - dAtA[i] = 0x18 - i++ - if m.AllowUnixSockets { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.AllowTerminal { - dAtA[i] = 0x20 - i++ - if m.AllowTerminal { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.FileLocks { - dAtA[i] = 0x28 - i++ - if m.FileLocks { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - dAtA[i] = 0x32 + if len(m.Options) > 0 { + for k, _ := range m.Options { + dAtA[i] = 0x12 i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) + v := m.Options[k] + mapSize := 1 + len(k) + sovShim(uint64(len(k))) + 1 + len(v) + sovShim(uint64(len(v))) + i = encodeVarintShim(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa i++ - i += copy(dAtA[i:], s) + i = encodeVarintShim(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintShim(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) } } - if len(m.CheckpointPath) > 0 { - dAtA[i] = 0x3a - i++ - i = encodeVarintShim(dAtA, i, uint64(len(m.CheckpointPath))) - i += copy(dAtA[i:], m.CheckpointPath) - } return i, nil } @@ -1885,31 +1833,18 @@ func (m *ProcessesResponse) Size() (n int) { func (m *CheckpointRequest) Size() (n int) { var l int _ = l - if m.Exit { - n += 2 - } - if m.AllowTcp { - n += 2 - } - if m.AllowUnixSockets { - n += 2 - } - if m.AllowTerminal { - n += 2 - } - if m.FileLocks { - n += 2 - } - if len(m.EmptyNamespaces) > 0 { - for _, s := range m.EmptyNamespaces { - l = len(s) - n += 1 + l + sovShim(uint64(l)) - } - } - l = len(m.CheckpointPath) + l = len(m.Path) if l > 0 { n += 1 + l + sovShim(uint64(l)) } + if len(m.Options) > 0 { + for k, v := range m.Options { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovShim(uint64(len(k))) + 1 + len(v) + sovShim(uint64(len(v))) + n += mapEntrySize + 1 + sovShim(uint64(mapEntrySize)) + } + } return n } @@ -2152,14 +2087,19 @@ func (this *CheckpointRequest) String() string { if this == nil { return "nil" } + keysForOptions := make([]string, 0, len(this.Options)) + for k, _ := range this.Options { + keysForOptions = append(keysForOptions, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + mapStringForOptions := "map[string]string{" + for _, k := range keysForOptions { + mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) + } + mapStringForOptions += "}" s := strings.Join([]string{`&CheckpointRequest{`, - `Exit:` + fmt.Sprintf("%v", this.Exit) + `,`, - `AllowTcp:` + fmt.Sprintf("%v", this.AllowTcp) + `,`, - `AllowUnixSockets:` + fmt.Sprintf("%v", this.AllowUnixSockets) + `,`, - `AllowTerminal:` + fmt.Sprintf("%v", this.AllowTerminal) + `,`, - `FileLocks:` + fmt.Sprintf("%v", this.FileLocks) + `,`, - `EmptyNamespaces:` + fmt.Sprintf("%v", this.EmptyNamespaces) + `,`, - `CheckpointPath:` + fmt.Sprintf("%v", this.CheckpointPath) + `,`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Options:` + mapStringForOptions + `,`, `}`, }, "") return s @@ -4246,108 +4186,8 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exit", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShim - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Exit = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowTcp", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShim - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowTcp = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowUnixSockets", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShim - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowUnixSockets = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowTerminal", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShim - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowTerminal = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileLocks", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowShim - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.FileLocks = bool(v != 0) - case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EmptyNamespaces", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4372,13 +4212,13 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EmptyNamespaces = append(m.EmptyNamespaces, string(dAtA[iNdEx:postIndex])) + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CheckpointPath", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowShim @@ -4388,20 +4228,107 @@ func (m *CheckpointRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthShim } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.CheckpointPath = string(dAtA[iNdEx:postIndex]) + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowShim + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowShim + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthShim + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Options == nil { + m.Options = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowShim + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowShim + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthShim + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Options[mapkey] = mapvalue + } else { + var mapvalue string + m.Options[mapkey] = mapvalue + } iNdEx = postIndex default: iNdEx = preIndex @@ -4534,78 +4461,75 @@ func init() { } var fileDescriptorShim = []byte{ - // 1168 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0x23, 0x45, - 0x10, 0xce, 0xd8, 0x8e, 0x63, 0x97, 0xd7, 0x4e, 0xd2, 0x8a, 0xa2, 0x59, 0x07, 0x9c, 0x68, 0xa4, - 0xd5, 0x3a, 0x59, 0x18, 0xb3, 0xd9, 0xdb, 0x0a, 0x0e, 0xf9, 0x43, 0x2c, 0x04, 0xb0, 0x26, 0xe1, - 0x84, 0x84, 0x35, 0x19, 0x77, 0xec, 0x26, 0xe3, 0xe9, 0x61, 0xba, 0x9d, 0x4d, 0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, 0xbe, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x7f, 0x4d, 0x1e, 0x99, 0x0d, 0x00, 0x00, + // 1110 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6f, 0xe3, 0x44, + 0x14, 0x5f, 0x27, 0x69, 0x9a, 0xbc, 0x34, 0xa5, 0x1d, 0x55, 0x95, 0xd7, 0x8b, 0xd2, 0xca, 0x12, + 0x52, 0xc5, 0x87, 0xb3, 0x9b, 0x4a, 0x08, 0x55, 0x20, 0xd1, 0xaf, 0xc3, 0x6a, 0x59, 0x35, 0xb8, + 0x48, 0x08, 0x2e, 0x95, 0x9b, 0x4c, 0xe3, 0x51, 0x6d, 0x8f, 0xf1, 0x8c, 0x43, 0x73, 0xe3, 0x4f, + 0x80, 0x23, 0x77, 0xfe, 0x0f, 0xae, 0x3d, 0x72, 0x83, 0xd3, 0xc2, 0xf6, 0x2f, 0x41, 0xf3, 0x61, + 0xc7, 0x69, 0x6b, 0xea, 0xae, 0xb8, 0x58, 0xf3, 0xde, 0xbc, 0x79, 0x9f, 0xbf, 0xf7, 0x9e, 0xe1, + 0x8b, 0x09, 0xe1, 0x7e, 0x7a, 0xee, 0x8c, 0x68, 0xd8, 0x1f, 0xd1, 0x88, 0x7b, 0x24, 0xc2, 0xc9, + 0xb8, 0x78, 0xf4, 0x62, 0xd2, 0x67, 0x38, 0x99, 0x92, 0x11, 0x66, 0x7d, 0xe6, 0x93, 0x50, 0x7e, + 0x9c, 0x38, 0xa1, 0x9c, 0xa2, 0xed, 0xb9, 0xa0, 0x93, 0xa4, 0x11, 0x27, 0x21, 0x76, 0x02, 0x12, + 0xa5, 0x57, 0x8e, 0x14, 0x9a, 0xbe, 0xb0, 0x9e, 0x4e, 0x28, 0x9d, 0x04, 0xb8, 0x2f, 0xe5, 0xcf, + 0xd3, 0x8b, 0xbe, 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xbd, 0x27, 0x3f, 0xdd, 0xf4, 0x8c, 0xeb, 0x9b, 0x9e, 0xf1, 0xc7, 0x4d, 0xcf, 0xf8, + 0xe7, 0xa6, 0x67, 0x9c, 0x37, 0xa5, 0xe4, 0xee, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd3, 0x47, + 0xdf, 0xa8, 0xba, 0x0d, 0x00, 0x00, } diff --git a/api/services/shim/shim.proto b/api/services/shim/shim.proto index 967137d7d..2024c13b1 100644 --- a/api/services/shim/shim.proto +++ b/api/services/shim/shim.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1.services.shim; +package containerd.runtime.linux.shim.v1; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; @@ -135,11 +135,6 @@ message ProcessesResponse{ } message CheckpointRequest { - bool exit = 1; - bool allow_tcp = 2; - bool allow_unix_sockets = 3; - bool allow_terminal = 4; - bool file_locks = 5; - repeated string empty_namespaces = 6; - string checkpoint_path = 7; + string path = 1; + map options = 2; } diff --git a/api/services/snapshot/snapshots.pb.go b/api/services/snapshot/snapshots.pb.go index 2ee996ba1..a1b16686a 100644 --- a/api/services/snapshot/snapshots.pb.go +++ b/api/services/snapshot/snapshots.pb.go @@ -9,16 +9,19 @@ github.com/containerd/containerd/api/services/snapshot/snapshots.proto It has these top-level messages: - PrepareRequest + PrepareSnapshotRequest + PrepareSnapshotResponse + ViewSnapshotRequest + ViewSnapshotResponse MountsRequest MountsResponse - RemoveRequest - CommitRequest - StatRequest + RemoveSnapshotRequest + CommitSnapshotRequest + StatSnapshotRequest Info - StatResponse - ListRequest - ListResponse + StatSnapshotResponse + ListSnapshotsRequest + ListSnapshotsResponse UsageRequest UsageResponse */ @@ -73,14 +76,39 @@ func (x Kind) String() string { } func (Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} } -type PrepareRequest struct { +type PrepareSnapshotRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` } -func (m *PrepareRequest) Reset() { *m = PrepareRequest{} } -func (*PrepareRequest) ProtoMessage() {} -func (*PrepareRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} } +func (m *PrepareSnapshotRequest) Reset() { *m = PrepareSnapshotRequest{} } +func (*PrepareSnapshotRequest) ProtoMessage() {} +func (*PrepareSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} } + +type PrepareSnapshotResponse struct { + Mounts []*containerd_v1_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` +} + +func (m *PrepareSnapshotResponse) Reset() { *m = PrepareSnapshotResponse{} } +func (*PrepareSnapshotResponse) ProtoMessage() {} +func (*PrepareSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{1} } + +type ViewSnapshotRequest struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (m *ViewSnapshotRequest) Reset() { *m = ViewSnapshotRequest{} } +func (*ViewSnapshotRequest) ProtoMessage() {} +func (*ViewSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{2} } + +type ViewSnapshotResponse struct { + Mounts []*containerd_v1_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` +} + +func (m *ViewSnapshotResponse) Reset() { *m = ViewSnapshotResponse{} } +func (*ViewSnapshotResponse) ProtoMessage() {} +func (*ViewSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{3} } type MountsRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -88,7 +116,7 @@ type MountsRequest struct { func (m *MountsRequest) Reset() { *m = MountsRequest{} } func (*MountsRequest) ProtoMessage() {} -func (*MountsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{1} } +func (*MountsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{4} } type MountsResponse struct { Mounts []*containerd_v1_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"` @@ -96,66 +124,66 @@ type MountsResponse struct { func (m *MountsResponse) Reset() { *m = MountsResponse{} } func (*MountsResponse) ProtoMessage() {} -func (*MountsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{2} } +func (*MountsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{5} } -type RemoveRequest struct { +type RemoveSnapshotRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *RemoveRequest) Reset() { *m = RemoveRequest{} } -func (*RemoveRequest) ProtoMessage() {} -func (*RemoveRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{3} } +func (m *RemoveSnapshotRequest) Reset() { *m = RemoveSnapshotRequest{} } +func (*RemoveSnapshotRequest) ProtoMessage() {} +func (*RemoveSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{6} } -type CommitRequest struct { +type CommitSnapshotRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` } -func (m *CommitRequest) Reset() { *m = CommitRequest{} } -func (*CommitRequest) ProtoMessage() {} -func (*CommitRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{4} } +func (m *CommitSnapshotRequest) Reset() { *m = CommitSnapshotRequest{} } +func (*CommitSnapshotRequest) ProtoMessage() {} +func (*CommitSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{7} } -type StatRequest struct { +type StatSnapshotRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *StatRequest) Reset() { *m = StatRequest{} } -func (*StatRequest) ProtoMessage() {} -func (*StatRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{5} } +func (m *StatSnapshotRequest) Reset() { *m = StatSnapshotRequest{} } +func (*StatSnapshotRequest) ProtoMessage() {} +func (*StatSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{8} } type Info struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=containerd.v1.snapshot.Kind" json:"kind,omitempty"` + Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=containerd.services.snapshots.v1.Kind" json:"kind,omitempty"` Readonly bool `protobuf:"varint,4,opt,name=readonly,proto3" json:"readonly,omitempty"` } func (m *Info) Reset() { *m = Info{} } func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{6} } +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{9} } -type StatResponse struct { +type StatSnapshotResponse struct { Info Info `protobuf:"bytes,1,opt,name=info" json:"info"` } -func (m *StatResponse) Reset() { *m = StatResponse{} } -func (*StatResponse) ProtoMessage() {} -func (*StatResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{7} } +func (m *StatSnapshotResponse) Reset() { *m = StatSnapshotResponse{} } +func (*StatSnapshotResponse) ProtoMessage() {} +func (*StatSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{10} } -type ListRequest struct { +type ListSnapshotsRequest struct { } -func (m *ListRequest) Reset() { *m = ListRequest{} } -func (*ListRequest) ProtoMessage() {} -func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{8} } +func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} } +func (*ListSnapshotsRequest) ProtoMessage() {} +func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{11} } -type ListResponse struct { +type ListSnapshotsResponse struct { Info []Info `protobuf:"bytes,1,rep,name=info" json:"info"` } -func (m *ListResponse) Reset() { *m = ListResponse{} } -func (*ListResponse) ProtoMessage() {} -func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{9} } +func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} } +func (*ListSnapshotsResponse) ProtoMessage() {} +func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{12} } type UsageRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` @@ -163,31 +191,34 @@ type UsageRequest struct { func (m *UsageRequest) Reset() { *m = UsageRequest{} } func (*UsageRequest) ProtoMessage() {} -func (*UsageRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{10} } +func (*UsageRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{13} } type UsageResponse struct { - Inodes int64 `protobuf:"varint,2,opt,name=inodes,proto3" json:"inodes,omitempty"` Size_ int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` + Inodes int64 `protobuf:"varint,2,opt,name=inodes,proto3" json:"inodes,omitempty"` } func (m *UsageResponse) Reset() { *m = UsageResponse{} } func (*UsageResponse) ProtoMessage() {} -func (*UsageResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{11} } +func (*UsageResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{14} } func init() { - proto.RegisterType((*PrepareRequest)(nil), "containerd.v1.snapshot.PrepareRequest") - proto.RegisterType((*MountsRequest)(nil), "containerd.v1.snapshot.MountsRequest") - proto.RegisterType((*MountsResponse)(nil), "containerd.v1.snapshot.MountsResponse") - proto.RegisterType((*RemoveRequest)(nil), "containerd.v1.snapshot.RemoveRequest") - proto.RegisterType((*CommitRequest)(nil), "containerd.v1.snapshot.CommitRequest") - proto.RegisterType((*StatRequest)(nil), "containerd.v1.snapshot.StatRequest") - proto.RegisterType((*Info)(nil), "containerd.v1.snapshot.Info") - proto.RegisterType((*StatResponse)(nil), "containerd.v1.snapshot.StatResponse") - proto.RegisterType((*ListRequest)(nil), "containerd.v1.snapshot.ListRequest") - proto.RegisterType((*ListResponse)(nil), "containerd.v1.snapshot.ListResponse") - proto.RegisterType((*UsageRequest)(nil), "containerd.v1.snapshot.UsageRequest") - proto.RegisterType((*UsageResponse)(nil), "containerd.v1.snapshot.UsageResponse") - proto.RegisterEnum("containerd.v1.snapshot.Kind", Kind_name, Kind_value) + proto.RegisterType((*PrepareSnapshotRequest)(nil), "containerd.services.snapshots.v1.PrepareSnapshotRequest") + proto.RegisterType((*PrepareSnapshotResponse)(nil), "containerd.services.snapshots.v1.PrepareSnapshotResponse") + proto.RegisterType((*ViewSnapshotRequest)(nil), "containerd.services.snapshots.v1.ViewSnapshotRequest") + proto.RegisterType((*ViewSnapshotResponse)(nil), "containerd.services.snapshots.v1.ViewSnapshotResponse") + proto.RegisterType((*MountsRequest)(nil), "containerd.services.snapshots.v1.MountsRequest") + proto.RegisterType((*MountsResponse)(nil), "containerd.services.snapshots.v1.MountsResponse") + proto.RegisterType((*RemoveSnapshotRequest)(nil), "containerd.services.snapshots.v1.RemoveSnapshotRequest") + proto.RegisterType((*CommitSnapshotRequest)(nil), "containerd.services.snapshots.v1.CommitSnapshotRequest") + proto.RegisterType((*StatSnapshotRequest)(nil), "containerd.services.snapshots.v1.StatSnapshotRequest") + proto.RegisterType((*Info)(nil), "containerd.services.snapshots.v1.Info") + proto.RegisterType((*StatSnapshotResponse)(nil), "containerd.services.snapshots.v1.StatSnapshotResponse") + proto.RegisterType((*ListSnapshotsRequest)(nil), "containerd.services.snapshots.v1.ListSnapshotsRequest") + proto.RegisterType((*ListSnapshotsResponse)(nil), "containerd.services.snapshots.v1.ListSnapshotsResponse") + proto.RegisterType((*UsageRequest)(nil), "containerd.services.snapshots.v1.UsageRequest") + proto.RegisterType((*UsageResponse)(nil), "containerd.services.snapshots.v1.UsageResponse") + proto.RegisterEnum("containerd.services.snapshots.v1.Kind", Kind_name, Kind_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -198,87 +229,87 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for Snapshot service +// Client API for Snapshots service -type SnapshotClient interface { - Prepare(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*MountsResponse, error) - View(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*MountsResponse, error) +type SnapshotsClient interface { + Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error) + View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) - Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) - Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) - Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error) - List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Snapshot_ListClient, error) + Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) + Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) + Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error) + List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) } -type snapshotClient struct { +type snapshotsClient struct { cc *grpc.ClientConn } -func NewSnapshotClient(cc *grpc.ClientConn) SnapshotClient { - return &snapshotClient{cc} +func NewSnapshotsClient(cc *grpc.ClientConn) SnapshotsClient { + return &snapshotsClient{cc} } -func (c *snapshotClient) Prepare(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*MountsResponse, error) { - out := new(MountsResponse) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Prepare", in, out, c.cc, opts...) +func (c *snapshotsClient) Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error) { + out := new(PrepareSnapshotResponse) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Prepare", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) View(ctx context.Context, in *PrepareRequest, opts ...grpc.CallOption) (*MountsResponse, error) { - out := new(MountsResponse) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/View", in, out, c.cc, opts...) +func (c *snapshotsClient) View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error) { + out := new(ViewSnapshotResponse) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/View", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) { +func (c *snapshotsClient) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) { out := new(MountsResponse) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Mounts", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Mounts", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) Commit(ctx context.Context, in *CommitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { +func (c *snapshotsClient) Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Commit", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Commit", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) Remove(ctx context.Context, in *RemoveRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { +func (c *snapshotsClient) Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) { out := new(google_protobuf1.Empty) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Remove", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Remove", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error) { - out := new(StatResponse) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Stat", in, out, c.cc, opts...) +func (c *snapshotsClient) Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error) { + out := new(StatSnapshotResponse) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Stat", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *snapshotClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Snapshot_ListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_Snapshot_serviceDesc.Streams[0], c.cc, "/containerd.v1.snapshot.Snapshot/List", opts...) +func (c *snapshotsClient) List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Snapshots_serviceDesc.Streams[0], c.cc, "/containerd.services.snapshots.v1.Snapshots/List", opts...) if err != nil { return nil, err } - x := &snapshotListClient{stream} + x := &snapshotsListClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -288,240 +319,240 @@ func (c *snapshotClient) List(ctx context.Context, in *ListRequest, opts ...grpc return x, nil } -type Snapshot_ListClient interface { - Recv() (*ListResponse, error) +type Snapshots_ListClient interface { + Recv() (*ListSnapshotsResponse, error) grpc.ClientStream } -type snapshotListClient struct { +type snapshotsListClient struct { grpc.ClientStream } -func (x *snapshotListClient) Recv() (*ListResponse, error) { - m := new(ListResponse) +func (x *snapshotsListClient) Recv() (*ListSnapshotsResponse, error) { + m := new(ListSnapshotsResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } -func (c *snapshotClient) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) { +func (c *snapshotsClient) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) { out := new(UsageResponse) - err := grpc.Invoke(ctx, "/containerd.v1.snapshot.Snapshot/Usage", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Usage", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -// Server API for Snapshot service +// Server API for Snapshots service -type SnapshotServer interface { - Prepare(context.Context, *PrepareRequest) (*MountsResponse, error) - View(context.Context, *PrepareRequest) (*MountsResponse, error) +type SnapshotsServer interface { + Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error) + View(context.Context, *ViewSnapshotRequest) (*ViewSnapshotResponse, error) Mounts(context.Context, *MountsRequest) (*MountsResponse, error) - Commit(context.Context, *CommitRequest) (*google_protobuf1.Empty, error) - Remove(context.Context, *RemoveRequest) (*google_protobuf1.Empty, error) - Stat(context.Context, *StatRequest) (*StatResponse, error) - List(*ListRequest, Snapshot_ListServer) error + Commit(context.Context, *CommitSnapshotRequest) (*google_protobuf1.Empty, error) + Remove(context.Context, *RemoveSnapshotRequest) (*google_protobuf1.Empty, error) + Stat(context.Context, *StatSnapshotRequest) (*StatSnapshotResponse, error) + List(*ListSnapshotsRequest, Snapshots_ListServer) error Usage(context.Context, *UsageRequest) (*UsageResponse, error) } -func RegisterSnapshotServer(s *grpc.Server, srv SnapshotServer) { - s.RegisterService(&_Snapshot_serviceDesc, srv) +func RegisterSnapshotsServer(s *grpc.Server, srv SnapshotsServer) { + s.RegisterService(&_Snapshots_serviceDesc, srv) } -func _Snapshot_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrepareRequest) +func _Snapshots_Prepare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PrepareSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Prepare(ctx, in) + return srv.(SnapshotsServer).Prepare(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Prepare", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Prepare", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Prepare(ctx, req.(*PrepareRequest)) + return srv.(SnapshotsServer).Prepare(ctx, req.(*PrepareSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_View_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PrepareRequest) +func _Snapshots_View_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ViewSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).View(ctx, in) + return srv.(SnapshotsServer).View(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/View", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/View", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).View(ctx, req.(*PrepareRequest)) + return srv.(SnapshotsServer).View(ctx, req.(*ViewSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_Mounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Snapshots_Mounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MountsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Mounts(ctx, in) + return srv.(SnapshotsServer).Mounts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Mounts", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Mounts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Mounts(ctx, req.(*MountsRequest)) + return srv.(SnapshotsServer).Mounts(ctx, req.(*MountsRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CommitRequest) +func _Snapshots_Commit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CommitSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Commit(ctx, in) + return srv.(SnapshotsServer).Commit(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Commit", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Commit", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Commit(ctx, req.(*CommitRequest)) + return srv.(SnapshotsServer).Commit(ctx, req.(*CommitSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveRequest) +func _Snapshots_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Remove(ctx, in) + return srv.(SnapshotsServer).Remove(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Remove", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Remove", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Remove(ctx, req.(*RemoveRequest)) + return srv.(SnapshotsServer).Remove(ctx, req.(*RemoveSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StatRequest) +func _Snapshots_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatSnapshotRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Stat(ctx, in) + return srv.(SnapshotsServer).Stat(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Stat", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Stat", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Stat(ctx, req.(*StatRequest)) + return srv.(SnapshotsServer).Stat(ctx, req.(*StatSnapshotRequest)) } return interceptor(ctx, in, info, handler) } -func _Snapshot_List_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(ListRequest) +func _Snapshots_List_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ListSnapshotsRequest) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(SnapshotServer).List(m, &snapshotListServer{stream}) + return srv.(SnapshotsServer).List(m, &snapshotsListServer{stream}) } -type Snapshot_ListServer interface { - Send(*ListResponse) error +type Snapshots_ListServer interface { + Send(*ListSnapshotsResponse) error grpc.ServerStream } -type snapshotListServer struct { +type snapshotsListServer struct { grpc.ServerStream } -func (x *snapshotListServer) Send(m *ListResponse) error { +func (x *snapshotsListServer) Send(m *ListSnapshotsResponse) error { return x.ServerStream.SendMsg(m) } -func _Snapshot_Usage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Snapshots_Usage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UsageRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SnapshotServer).Usage(ctx, in) + return srv.(SnapshotsServer).Usage(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.snapshot.Snapshot/Usage", + FullMethod: "/containerd.services.snapshots.v1.Snapshots/Usage", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SnapshotServer).Usage(ctx, req.(*UsageRequest)) + return srv.(SnapshotsServer).Usage(ctx, req.(*UsageRequest)) } return interceptor(ctx, in, info, handler) } -var _Snapshot_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.snapshot.Snapshot", - HandlerType: (*SnapshotServer)(nil), +var _Snapshots_serviceDesc = grpc.ServiceDesc{ + ServiceName: "containerd.services.snapshots.v1.Snapshots", + HandlerType: (*SnapshotsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Prepare", - Handler: _Snapshot_Prepare_Handler, + Handler: _Snapshots_Prepare_Handler, }, { MethodName: "View", - Handler: _Snapshot_View_Handler, + Handler: _Snapshots_View_Handler, }, { MethodName: "Mounts", - Handler: _Snapshot_Mounts_Handler, + Handler: _Snapshots_Mounts_Handler, }, { MethodName: "Commit", - Handler: _Snapshot_Commit_Handler, + Handler: _Snapshots_Commit_Handler, }, { MethodName: "Remove", - Handler: _Snapshot_Remove_Handler, + Handler: _Snapshots_Remove_Handler, }, { MethodName: "Stat", - Handler: _Snapshot_Stat_Handler, + Handler: _Snapshots_Stat_Handler, }, { MethodName: "Usage", - Handler: _Snapshot_Usage_Handler, + Handler: _Snapshots_Usage_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "List", - Handler: _Snapshot_List_Handler, + Handler: _Snapshots_List_Handler, ServerStreams: true, }, }, Metadata: "github.com/containerd/containerd/api/services/snapshot/snapshots.proto", } -func (m *PrepareRequest) Marshal() (dAtA []byte, err error) { +func (m *PrepareSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -531,7 +562,7 @@ func (m *PrepareRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PrepareRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *PrepareSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -551,6 +582,96 @@ func (m *PrepareRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *PrepareSnapshotResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PrepareSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + dAtA[i] = 0xa + i++ + i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ViewSnapshotRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ViewSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Parent) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Parent))) + i += copy(dAtA[i:], m.Parent) + } + return i, nil +} + +func (m *ViewSnapshotResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ViewSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Mounts) > 0 { + for _, msg := range m.Mounts { + dAtA[i] = 0xa + i++ + i = encodeVarintSnapshots(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + func (m *MountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -605,7 +726,7 @@ func (m *MountsResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *RemoveRequest) Marshal() (dAtA []byte, err error) { +func (m *RemoveSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -615,7 +736,7 @@ func (m *RemoveRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RemoveRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *RemoveSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -629,7 +750,7 @@ func (m *RemoveRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *CommitRequest) Marshal() (dAtA []byte, err error) { +func (m *CommitSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -639,7 +760,7 @@ func (m *CommitRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *CommitRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *CommitSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -659,7 +780,7 @@ func (m *CommitRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *StatRequest) Marshal() (dAtA []byte, err error) { +func (m *StatSnapshotRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -669,7 +790,7 @@ func (m *StatRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *StatSnapshotRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -728,7 +849,7 @@ func (m *Info) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *StatResponse) Marshal() (dAtA []byte, err error) { +func (m *StatSnapshotResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -738,7 +859,7 @@ func (m *StatResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StatResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *StatSnapshotResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -754,7 +875,7 @@ func (m *StatResponse) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ListRequest) Marshal() (dAtA []byte, err error) { +func (m *ListSnapshotsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -764,7 +885,7 @@ func (m *ListRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ListSnapshotsRequest) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -772,7 +893,7 @@ func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ListResponse) Marshal() (dAtA []byte, err error) { +func (m *ListSnapshotsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -782,7 +903,7 @@ func (m *ListResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *ListSnapshotsResponse) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -881,7 +1002,7 @@ func encodeVarintSnapshots(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *PrepareRequest) Size() (n int) { +func (m *PrepareSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Key) @@ -895,6 +1016,44 @@ func (m *PrepareRequest) Size() (n int) { return n } +func (m *PrepareSnapshotResponse) Size() (n int) { + var l int + _ = l + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovSnapshots(uint64(l)) + } + } + return n +} + +func (m *ViewSnapshotRequest) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovSnapshots(uint64(l)) + } + l = len(m.Parent) + if l > 0 { + n += 1 + l + sovSnapshots(uint64(l)) + } + return n +} + +func (m *ViewSnapshotResponse) Size() (n int) { + var l int + _ = l + if len(m.Mounts) > 0 { + for _, e := range m.Mounts { + l = e.Size() + n += 1 + l + sovSnapshots(uint64(l)) + } + } + return n +} + func (m *MountsRequest) Size() (n int) { var l int _ = l @@ -917,7 +1076,7 @@ func (m *MountsResponse) Size() (n int) { return n } -func (m *RemoveRequest) Size() (n int) { +func (m *RemoveSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Key) @@ -927,7 +1086,7 @@ func (m *RemoveRequest) Size() (n int) { return n } -func (m *CommitRequest) Size() (n int) { +func (m *CommitSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Name) @@ -941,7 +1100,7 @@ func (m *CommitRequest) Size() (n int) { return n } -func (m *StatRequest) Size() (n int) { +func (m *StatSnapshotRequest) Size() (n int) { var l int _ = l l = len(m.Key) @@ -971,7 +1130,7 @@ func (m *Info) Size() (n int) { return n } -func (m *StatResponse) Size() (n int) { +func (m *StatSnapshotResponse) Size() (n int) { var l int _ = l l = m.Info.Size() @@ -979,13 +1138,13 @@ func (m *StatResponse) Size() (n int) { return n } -func (m *ListRequest) Size() (n int) { +func (m *ListSnapshotsRequest) Size() (n int) { var l int _ = l return n } -func (m *ListResponse) Size() (n int) { +func (m *ListSnapshotsResponse) Size() (n int) { var l int _ = l if len(m.Info) > 0 { @@ -1032,17 +1191,48 @@ func sovSnapshots(x uint64) (n int) { func sozSnapshots(x uint64) (n int) { return sovSnapshots(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *PrepareRequest) String() string { +func (this *PrepareSnapshotRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&PrepareRequest{`, + s := strings.Join([]string{`&PrepareSnapshotRequest{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, `}`, }, "") return s } +func (this *PrepareSnapshotResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PrepareSnapshotResponse{`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_v1_types.Mount", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ViewSnapshotRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ViewSnapshotRequest{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Parent:` + fmt.Sprintf("%v", this.Parent) + `,`, + `}`, + }, "") + return s +} +func (this *ViewSnapshotResponse) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ViewSnapshotResponse{`, + `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_v1_types.Mount", 1) + `,`, + `}`, + }, "") + return s +} func (this *MountsRequest) String() string { if this == nil { return "nil" @@ -1063,32 +1253,32 @@ func (this *MountsResponse) String() string { }, "") return s } -func (this *RemoveRequest) String() string { +func (this *RemoveSnapshotRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&RemoveRequest{`, + s := strings.Join([]string{`&RemoveSnapshotRequest{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } -func (this *CommitRequest) String() string { +func (this *CommitSnapshotRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&CommitRequest{`, + s := strings.Join([]string{`&CommitSnapshotRequest{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") return s } -func (this *StatRequest) String() string { +func (this *StatSnapshotRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&StatRequest{`, + s := strings.Join([]string{`&StatSnapshotRequest{`, `Key:` + fmt.Sprintf("%v", this.Key) + `,`, `}`, }, "") @@ -1107,30 +1297,30 @@ func (this *Info) String() string { }, "") return s } -func (this *StatResponse) String() string { +func (this *StatSnapshotResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&StatResponse{`, + s := strings.Join([]string{`&StatSnapshotResponse{`, `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } -func (this *ListRequest) String() string { +func (this *ListSnapshotsRequest) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListRequest{`, + s := strings.Join([]string{`&ListSnapshotsRequest{`, `}`, }, "") return s } -func (this *ListResponse) String() string { +func (this *ListSnapshotsResponse) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ListResponse{`, + s := strings.Join([]string{`&ListSnapshotsResponse{`, `Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`, `}`, }, "") @@ -1165,7 +1355,7 @@ func valueToStringSnapshots(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *PrepareRequest) Unmarshal(dAtA []byte) error { +func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1188,10 +1378,10 @@ func (m *PrepareRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PrepareRequest: wiretype end group for non-group") + return fmt.Errorf("proto: PrepareSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PrepareRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PrepareSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1273,6 +1463,276 @@ func (m *PrepareRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PrepareSnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PrepareSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &containerd_v1_types.Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshots(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSnapshots + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ViewSnapshotRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ViewSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshots(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSnapshots + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ViewSnapshotResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ViewSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshots + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshots + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mounts = append(m.Mounts, &containerd_v1_types.Mount{}) + if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshots(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSnapshots + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MountsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1433,7 +1893,7 @@ func (m *MountsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *RemoveRequest) Unmarshal(dAtA []byte) error { +func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1456,10 +1916,10 @@ func (m *RemoveRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RemoveRequest: wiretype end group for non-group") + return fmt.Errorf("proto: RemoveSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RemoveRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RemoveSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1512,7 +1972,7 @@ func (m *RemoveRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *CommitRequest) Unmarshal(dAtA []byte) error { +func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1535,10 +1995,10 @@ func (m *CommitRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CommitRequest: wiretype end group for non-group") + return fmt.Errorf("proto: CommitSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CommitSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1620,7 +2080,7 @@ func (m *CommitRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *StatRequest) Unmarshal(dAtA []byte) error { +func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1643,10 +2103,10 @@ func (m *StatRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatRequest: wiretype end group for non-group") + return fmt.Errorf("proto: StatSnapshotRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatSnapshotRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1846,7 +2306,7 @@ func (m *Info) Unmarshal(dAtA []byte) error { } return nil } -func (m *StatResponse) Unmarshal(dAtA []byte) error { +func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1869,10 +2329,10 @@ func (m *StatResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StatResponse: wiretype end group for non-group") + return fmt.Errorf("proto: StatSnapshotResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StatResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: StatSnapshotResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1926,7 +2386,7 @@ func (m *StatResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListRequest) Unmarshal(dAtA []byte) error { +func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1949,10 +2409,10 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ListSnapshotsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListSnapshotsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1976,7 +2436,7 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListResponse) Unmarshal(dAtA []byte) error { +func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1999,10 +2459,10 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ListResponse: wiretype end group for non-group") + return fmt.Errorf("proto: ListSnapshotsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ListSnapshotsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2334,46 +2794,50 @@ func init() { } var fileDescriptorSnapshots = []byte{ - // 649 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcd, 0x6e, 0x13, 0x31, - 0x10, 0xc7, 0xb3, 0xcd, 0x36, 0xb4, 0x93, 0x26, 0x2a, 0x16, 0xaa, 0xa2, 0x05, 0x6d, 0x97, 0x40, - 0x51, 0xc4, 0x61, 0xb7, 0x04, 0xc1, 0x01, 0xb8, 0xf4, 0x13, 0x55, 0xa5, 0x02, 0xb6, 0xa1, 0x88, - 0xe3, 0x36, 0x71, 0x53, 0xab, 0x5d, 0x7b, 0x89, 0x9d, 0xa0, 0x70, 0xea, 0x11, 0xf5, 0x1d, 0x7a, - 0x02, 0xf1, 0x10, 0x3c, 0x41, 0x8f, 0x1c, 0x39, 0x21, 0x9a, 0x27, 0x41, 0xb6, 0x77, 0xdb, 0x04, - 0xea, 0x96, 0x4a, 0x5c, 0x56, 0x33, 0xf6, 0x7f, 0x7e, 0x1e, 0xcf, 0xce, 0x18, 0x56, 0xdb, 0x44, - 0xec, 0x76, 0xb7, 0xfd, 0x26, 0x8b, 0x83, 0x26, 0xa3, 0x22, 0x22, 0x14, 0x77, 0x5a, 0xc3, 0x66, - 0x94, 0x90, 0x80, 0xe3, 0x4e, 0x8f, 0x34, 0x31, 0x0f, 0x38, 0x8d, 0x12, 0xbe, 0xcb, 0xc4, 0xa9, - 0xc1, 0xfd, 0xa4, 0xc3, 0x04, 0x43, 0x33, 0x67, 0x11, 0x7e, 0xef, 0x81, 0x9f, 0x6d, 0x3b, 0x37, - 0xda, 0xac, 0xcd, 0x94, 0x24, 0x90, 0x96, 0x56, 0x3b, 0x37, 0xdb, 0x8c, 0xb5, 0xf7, 0x71, 0xa0, - 0xbc, 0xed, 0xee, 0x4e, 0x80, 0xe3, 0x44, 0xf4, 0xd3, 0xcd, 0x67, 0xff, 0x94, 0x92, 0xe8, 0x27, - 0x98, 0x07, 0x31, 0xeb, 0x52, 0xa1, 0xbf, 0x3a, 0xba, 0xfa, 0x04, 0xca, 0xaf, 0x3a, 0x38, 0x89, - 0x3a, 0x38, 0xc4, 0xef, 0xbb, 0x98, 0x0b, 0x34, 0x0d, 0xf9, 0x3d, 0xdc, 0xaf, 0x58, 0x9e, 0x55, - 0x9b, 0x0c, 0xa5, 0x89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 0xc9, 0x4d, 0xb0, 0x65, 0xe3, 0x9b, 0x91, 0x43, 0x53, 0x62, 0x46, 0x0e, 0xcf, 0xce, 0xbc, 0x85, - 0x1a, 0x30, 0xae, 0x7a, 0x1c, 0x19, 0x03, 0x86, 0x87, 0xc4, 0x99, 0xbb, 0x44, 0xa5, 0xb9, 0x8b, - 0x95, 0xe3, 0x13, 0x37, 0xf7, 0xe3, 0xc4, 0xcd, 0x1d, 0x0c, 0x5c, 0xeb, 0x78, 0xe0, 0x5a, 0xdf, - 0x07, 0xae, 0xf5, 0x6b, 0xe0, 0x5a, 0xdb, 0x05, 0x55, 0xa7, 0x87, 0xbf, 0x03, 0x00, 0x00, 0xff, - 0xff, 0xed, 0x08, 0xd9, 0xe9, 0x91, 0x06, 0x00, 0x00, + // 710 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4b, 0x6f, 0xd3, 0x4e, + 0x10, 0x8f, 0x1b, 0xff, 0xd3, 0x76, 0xfa, 0x50, 0xff, 0xdb, 0x34, 0x44, 0x46, 0x32, 0xc6, 0x07, + 0x08, 0x1c, 0xec, 0x36, 0x08, 0xca, 0x53, 0xd0, 0x17, 0x52, 0x29, 0x11, 0xc8, 0x2d, 0x15, 0x3d, + 0xba, 0xc9, 0x36, 0xb5, 0x5a, 0x7b, 0x4d, 0x76, 0x13, 0x14, 0x0e, 0x08, 0x6e, 0xa8, 0xdf, 0xa1, + 0x27, 0xf8, 0x14, 0x7c, 0x82, 0x1e, 0x39, 0x72, 0x42, 0x34, 0x9f, 0x04, 0xed, 0x7a, 0x93, 0xbe, + 0x1c, 0xd9, 0x4d, 0x2f, 0xd1, 0xec, 0xe6, 0xf7, 0x18, 0xcf, 0x78, 0xc6, 0xf0, 0xb2, 0xee, 0xb1, + 0xdd, 0xe6, 0xb6, 0x55, 0x25, 0xbe, 0x5d, 0x25, 0x01, 0x73, 0xbd, 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c, + 0x2a, 0xb2, 0x92, 0x35, 0x4e, 0x4f, 0xbd, 0x66, 0xa7, 0xc6, 0x47, 0x5e, 0x8b, 0xc5, 0xa3, 0x63, + 0x3d, 0xf3, 0xfb, 0x58, 0xcf, 0x7c, 0xe9, 0xe8, 0xca, 0x51, 0x47, 0x57, 0x7e, 0x75, 0x74, 0xe5, + 0x6f, 0x47, 0x57, 0xb6, 0x73, 0xa2, 0x0b, 0xf7, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xee, + 0xc9, 0x12, 0xaa, 0x08, 0x00, 0x00, } diff --git a/api/services/snapshot/snapshots.proto b/api/services/snapshot/snapshots.proto index 76c27e4b1..5d3aa82d9 100644 --- a/api/services/snapshot/snapshots.proto +++ b/api/services/snapshot/snapshots.proto @@ -1,29 +1,41 @@ syntax = "proto3"; -package containerd.v1.snapshot; +package containerd.services.snapshots.v1; import "gogoproto/gogo.proto"; import "google/protobuf/empty.proto"; import "github.com/containerd/containerd/api/types/mount/mount.proto"; // Snapshot service manages snapshots -service Snapshot { - rpc Prepare(PrepareRequest) returns (MountsResponse); - rpc View(PrepareRequest) returns (MountsResponse); +service Snapshots { + rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); + rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); rpc Mounts(MountsRequest) returns (MountsResponse); - rpc Commit(CommitRequest) returns (google.protobuf.Empty); - rpc Remove(RemoveRequest) returns (google.protobuf.Empty); - rpc Stat(StatRequest) returns (StatResponse); - rpc List(ListRequest) returns (stream ListResponse); + rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); + rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); + rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); + rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); rpc Usage(UsageRequest) returns (UsageResponse); - // "Snapshot" prepares a new set of mounts from existing name } -message PrepareRequest { +message PrepareSnapshotRequest { string key = 1; string parent = 2; } +message PrepareSnapshotResponse { + repeated containerd.v1.types.Mount mounts = 1; +} + +message ViewSnapshotRequest { + string key = 1; + string parent = 2; +} + +message ViewSnapshotResponse { + repeated containerd.v1.types.Mount mounts = 1; +} + message MountsRequest { string key = 1; } @@ -32,16 +44,16 @@ message MountsResponse { repeated containerd.v1.types.Mount mounts = 1; } -message RemoveRequest { +message RemoveSnapshotRequest { string key = 1; } -message CommitRequest { +message CommitSnapshotRequest { string name = 1; string key = 2; } -message StatRequest { +message StatSnapshotRequest { string key = 1; } @@ -61,13 +73,14 @@ message Info { bool readonly = 4; } -message StatResponse { +message StatSnapshotResponse { Info info = 1 [(gogoproto.nullable) = false]; } -message ListRequest{} +message ListSnapshotsRequest{ +} -message ListResponse { +message ListSnapshotsResponse { repeated Info info = 1 [(gogoproto.nullable) = false]; } @@ -76,6 +89,6 @@ message UsageRequest { } message UsageResponse { - int64 inodes = 2; int64 size = 1; + int64 inodes = 2; } diff --git a/api/services/version/version.pb.go b/api/services/version/version.pb.go index 5dc5fd697..5da34428a 100644 --- a/api/services/version/version.pb.go +++ b/api/services/version/version.pb.go @@ -50,7 +50,7 @@ func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorVersion, []int{0} } func init() { - proto.RegisterType((*VersionResponse)(nil), "containerd.v1.VersionResponse") + proto.RegisterType((*VersionResponse)(nil), "containerd.services.version.v1.VersionResponse") } // Reference imports to suppress errors if they are not otherwise used. @@ -77,7 +77,7 @@ func NewVersionClient(cc *grpc.ClientConn) VersionClient { func (c *versionClient) Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { out := new(VersionResponse) - err := grpc.Invoke(ctx, "/containerd.v1.Version/Version", in, out, c.cc, opts...) + err := grpc.Invoke(ctx, "/containerd.services.version.v1.Version/Version", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -104,7 +104,7 @@ func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/containerd.v1.Version/Version", + FullMethod: "/containerd.services.version.v1.Version/Version", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(VersionServer).Version(ctx, req.(*google_protobuf.Empty)) @@ -113,7 +113,7 @@ func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(int } var _Version_serviceDesc = grpc.ServiceDesc{ - ServiceName: "containerd.v1.Version", + ServiceName: "containerd.services.version.v1.Version", HandlerType: (*VersionServer)(nil), Methods: []grpc.MethodDesc{ { @@ -446,20 +446,20 @@ func init() { } var fileDescriptorVersion = []byte{ - // 225 bytes of a gzipped FileDescriptorProto + // 230 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0x97, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0xc1, 0x68, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, - 0x5e, 0x84, 0x72, 0xbd, 0x32, 0x43, 0x29, 0xe9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0xb0, - 0x64, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0xad, 0x94, 0x48, 0x7a, 0x7e, - 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x44, 0x95, 0xdc, 0xb9, 0xf8, 0xc3, 0x20, 0x46, 0x06, - 0xa5, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0x49, 0x70, 0xb1, 0x43, 0x6d, 0x91, 0x60, 0x54, - 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x85, 0xa4, 0xb8, 0x38, 0x8a, 0x52, 0xcb, 0x32, 0xc1, 0x52, - 0x4c, 0x60, 0x29, 0x38, 0xdf, 0xc8, 0x87, 0x8b, 0x1d, 0x6a, 0x90, 0x90, 0x23, 0x82, 0x29, 0xa6, - 0x07, 0x71, 0x92, 0x1e, 0xcc, 0x49, 0x7a, 0xae, 0x20, 0x27, 0x49, 0xc9, 0xe9, 0xa1, 0xb8, 0x5c, - 0x0f, 0xcd, 0x0d, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, 0x48, - 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, - 0x03, 0x9b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x27, 0xa4, 0xd8, 0x40, 0x01, 0x00, - 0x00, + 0x39, 0x84, 0x72, 0x3d, 0x98, 0x52, 0x3d, 0x98, 0x92, 0x32, 0x43, 0x29, 0xe9, 0xf4, 0xfc, 0xfc, + 0xf4, 0x9c, 0x54, 0x7d, 0xb0, 0xea, 0xa4, 0xd2, 0x34, 0xfd, 0xd4, 0xdc, 0x82, 0x92, 0x4a, 0x88, + 0x66, 0x29, 0x91, 0xf4, 0xfc, 0xf4, 0x7c, 0x30, 0x53, 0x1f, 0xc4, 0x82, 0x88, 0x2a, 0xb9, 0x73, + 0xf1, 0x87, 0x41, 0x0c, 0x08, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x92, 0xe0, 0x62, + 0x87, 0x9a, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe3, 0x0a, 0x49, 0x71, 0x71, 0x14, + 0xa5, 0x96, 0x65, 0x82, 0xa5, 0x98, 0xc0, 0x52, 0x70, 0xbe, 0x51, 0x2c, 0x17, 0x3b, 0xd4, 0x20, + 0xa1, 0x20, 0x04, 0x53, 0x4c, 0x0f, 0xe2, 0x24, 0x3d, 0x98, 0x93, 0xf4, 0x5c, 0x41, 0x4e, 0x92, + 0xd2, 0xd7, 0xc3, 0xef, 0x15, 0x3d, 0x34, 0x47, 0x39, 0x49, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe3, + 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, + 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x6c, 0xb4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x53, + 0x3d, 0xea, 0x62, 0x01, 0x00, 0x00, } diff --git a/api/services/version/version.proto b/api/services/version/version.proto index a2ed79fd7..277061d76 100644 --- a/api/services/version/version.proto +++ b/api/services/version/version.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package containerd.v1; +package containerd.services.version.v1; import "google/protobuf/empty.proto"; import "gogoproto/gogo.proto"; diff --git a/api/types/event/container.pb.go b/api/types/event/container.pb.go index c879d8c8d..7fee97980 100644 --- a/api/types/event/container.pb.go +++ b/api/types/event/container.pb.go @@ -21,7 +21,7 @@ ContainerDelete ContentDelete Envelope - ImagePut + ImageUpdate ImageDelete NamespaceCreate NamespaceUpdate @@ -63,15 +63,26 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package type ContainerCreate struct { - ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` - Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` - Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"` + ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + Runtime *ContainerCreate_Runtime `protobuf:"bytes,3,opt,name=runtime" json:"runtime,omitempty"` } func (m *ContainerCreate) Reset() { *m = ContainerCreate{} } func (*ContainerCreate) ProtoMessage() {} func (*ContainerCreate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{0} } +type ContainerCreate_Runtime struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ContainerCreate_Runtime) Reset() { *m = ContainerCreate_Runtime{} } +func (*ContainerCreate_Runtime) ProtoMessage() {} +func (*ContainerCreate_Runtime) Descriptor() ([]byte, []int) { + return fileDescriptorContainer, []int{0, 0} +} + type ContainerUpdate struct { ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` @@ -93,6 +104,7 @@ func (*ContainerDelete) Descriptor() ([]byte, []int) { return fileDescriptorCont func init() { proto.RegisterType((*ContainerCreate)(nil), "containerd.v1.types.ContainerCreate") + proto.RegisterType((*ContainerCreate_Runtime)(nil), "containerd.v1.types.ContainerCreate.Runtime") proto.RegisterType((*ContainerUpdate)(nil), "containerd.v1.types.ContainerUpdate") proto.RegisterType((*ContainerDelete)(nil), "containerd.v1.types.ContainerDelete") } @@ -123,11 +135,56 @@ func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintContainer(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } - if len(m.Runtime) > 0 { + if m.Runtime != nil { dAtA[i] = 0x1a i++ - i = encodeVarintContainer(dAtA, i, uint64(len(m.Runtime))) - i += copy(dAtA[i:], m.Runtime) + i = encodeVarintContainer(dAtA, i, uint64(m.Runtime.Size())) + n1, err := m.Runtime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *ContainerCreate_Runtime) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintContainer(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Options) > 0 { + for k, _ := range m.Options { + dAtA[i] = 0x12 + i++ + v := m.Options[k] + mapSize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) + i = encodeVarintContainer(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintContainer(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintContainer(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } } return i, nil } @@ -247,10 +304,28 @@ func (m *ContainerCreate) Size() (n int) { if l > 0 { n += 1 + l + sovContainer(uint64(l)) } - l = len(m.Runtime) + if m.Runtime != nil { + l = m.Runtime.Size() + n += 1 + l + sovContainer(uint64(l)) + } + return n +} + +func (m *ContainerCreate_Runtime) Size() (n int) { + var l int + _ = l + l = len(m.Name) if l > 0 { n += 1 + l + sovContainer(uint64(l)) } + if len(m.Options) > 0 { + for k, v := range m.Options { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v))) + n += mapEntrySize + 1 + sovContainer(uint64(mapEntrySize)) + } + } return n } @@ -310,7 +385,28 @@ func (this *ContainerCreate) String() string { s := strings.Join([]string{`&ContainerCreate{`, `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`, `Image:` + fmt.Sprintf("%v", this.Image) + `,`, - `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`, + `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "ContainerCreate_Runtime", "ContainerCreate_Runtime", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerCreate_Runtime) String() string { + if this == nil { + return "nil" + } + keysForOptions := make([]string, 0, len(this.Options)) + for k, _ := range this.Options { + keysForOptions = append(keysForOptions, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForOptions) + mapStringForOptions := "map[string]string{" + for _, k := range keysForOptions { + mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k]) + } + mapStringForOptions += "}" + s := strings.Join([]string{`&ContainerCreate_Runtime{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Options:` + mapStringForOptions + `,`, `}`, }, "") return s @@ -447,6 +543,89 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType) } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthContainer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Runtime == nil { + m.Runtime = &ContainerCreate_Runtime{} + } + if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipContainer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthContainer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Runtime: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Runtime: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { @@ -470,7 +649,123 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Runtime = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthContainer + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthContainer + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Options == nil { + m.Options = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowContainer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthContainer + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Options[mapkey] = mapvalue + } else { + var mapvalue string + m.Options[mapkey] = mapvalue + } iNdEx = postIndex default: iNdEx = preIndex @@ -935,26 +1230,30 @@ func init() { } var fileDescriptorContainer = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xbf, 0x4e, 0xf3, 0x30, - 0x14, 0xc5, 0xeb, 0xe6, 0xfb, 0x82, 0x70, 0x90, 0x8a, 0x42, 0x07, 0xab, 0x43, 0x5a, 0x65, 0xea, - 0xe4, 0x40, 0x59, 0x80, 0x09, 0xf5, 0x0f, 0xa2, 0x12, 0x53, 0x10, 0x33, 0x4a, 0x9b, 0x4b, 0xb0, - 0x48, 0xe3, 0xc8, 0x75, 0x2a, 0x75, 0x63, 0xe0, 0xe1, 0x3a, 0x32, 0x32, 0x55, 0xd4, 0x4f, 0x82, - 0xe2, 0xb4, 0x69, 0x84, 0x98, 0x10, 0xdb, 0xbd, 0xbe, 0xbf, 0xa3, 0x73, 0x74, 0x8c, 0xaf, 0x23, - 0x26, 0x9f, 0xb3, 0x09, 0x9d, 0xf2, 0x99, 0x37, 0xe5, 0x89, 0x0c, 0x58, 0x02, 0x22, 0xac, 0x8e, - 0x41, 0xca, 0x3c, 0xb9, 0x4c, 0x61, 0xee, 0xc1, 0x02, 0x12, 0xb9, 0x3f, 0xd1, 0x54, 0x70, 0xc9, - 0xed, 0x93, 0x3d, 0x4b, 0x17, 0x67, 0x54, 0xa3, 0xad, 0x66, 0xc4, 0x23, 0xae, 0xef, 0x5e, 0x3e, - 0x15, 0xa8, 0x9b, 0xe1, 0xc6, 0x60, 0x07, 0x0f, 0x04, 0x04, 0x12, 0xec, 0x1e, 0x3e, 0x2a, 0xf5, - 0x8f, 0x2c, 0x24, 0xa8, 0x83, 0xba, 0x87, 0xfd, 0x86, 0x5a, 0xb7, 0xad, 0x12, 0x1d, 0x0f, 0x7d, - 0xab, 0x84, 0xc6, 0xa1, 0xdd, 0xc4, 0xff, 0xd9, 0x2c, 0x88, 0x80, 0xd4, 0x73, 0xd8, 0x2f, 0x16, - 0x9b, 0xe0, 0x03, 0x91, 0x25, 0x92, 0xcd, 0x80, 0x18, 0xfa, 0x7d, 0xb7, 0xba, 0x6f, 0xf5, 0x8a, - 0xef, 0x43, 0x1a, 0xfe, 0xad, 0xef, 0x2d, 0x36, 0xe3, 0x60, 0x02, 0xf1, 0x9c, 0x18, 0x1d, 0xa3, - 0x6b, 0xf5, 0x4e, 0xe9, 0x0f, 0x85, 0xd0, 0x6f, 0xfe, 0xf4, 0x4e, 0x4b, 0x46, 0x89, 0x14, 0x4b, - 0x7f, 0xab, 0xb7, 0x5d, 0x6c, 0x0a, 0xce, 0xe5, 0xd3, 0x9c, 0xfc, 0xd3, 0x69, 0xb0, 0x5a, 0xb7, - 0x4d, 0x9f, 0x73, 0x79, 0x73, 0xef, 0x6f, 0x2f, 0xad, 0x4b, 0x6c, 0x55, 0xa4, 0xf6, 0x31, 0x36, - 0x5e, 0x60, 0x59, 0xa4, 0xf7, 0xf3, 0x31, 0x0f, 0xb9, 0x08, 0xe2, 0xac, 0x0c, 0xa9, 0x97, 0xab, - 0xfa, 0x05, 0x72, 0x47, 0x95, 0x16, 0x86, 0x10, 0xc3, 0xef, 0x5a, 0xe8, 0x93, 0xd5, 0xc6, 0xa9, - 0x7d, 0x6c, 0x9c, 0xda, 0xab, 0x72, 0xd0, 0x4a, 0x39, 0xe8, 0x5d, 0x39, 0xe8, 0x53, 0x39, 0x68, - 0x62, 0xea, 0x5f, 0x3e, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xf2, 0x95, 0xd3, 0x54, 0x02, - 0x00, 0x00, + // 387 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x4f, 0x6b, 0xe2, 0x40, + 0x1c, 0x75, 0x12, 0x37, 0xb2, 0x13, 0xc1, 0x65, 0xd6, 0x43, 0xc8, 0x21, 0x8a, 0x27, 0x0f, 0xcb, + 0x64, 0xd7, 0xbd, 0xac, 0x9e, 0x16, 0xff, 0x51, 0xa1, 0x50, 0x18, 0xe9, 0xb9, 0x44, 0x33, 0x4d, + 0x43, 0x93, 0x4c, 0x48, 0x46, 0xc1, 0x5b, 0x0f, 0xfd, 0x3c, 0xfd, 0x1c, 0x1e,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 0x0e, 0xbe, 0xc8, 0xb4, 0x93, 0x80, 0x47, 0x1b, 0x72, 0xd8, 0xa4, 0x0f, 0x60, + 0xbd, 0x0c, 0xa0, 0x1f, 0x50, 0xbe, 0xa5, 0x9b, 0xfc, 0x6e, 0x3a, 0xa6, 0xa1, 0xd7, 0x96, 0xb7, + 0x2a, 0x42, 0x8b, 0xc7, 0x40, 0xfa, 0x07, 0x3a, 0xf7, 0xe5, 0x5a, 0x2f, 0x43, 0xfb, 0x6b, 0x6b, + 0x3d, 0x83, 0x8a, 0x67, 0x2d, 0xa8, 0x17, 0x6b, 0xb2, 0x48, 0xfb, 0xfb, 0xe3, 0xb4, 0xd9, 0x7d, + 0x7c, 0x2e, 0x24, 0x59, 0xc8, 0x5c, 0x8f, 0x3a, 0x50, 0x89, 0x18, 0xe3, 0xd7, 0xb1, 0x56, 0x15, + 0x6e, 0x60, 0xb2, 0x6b, 0x29, 0x84, 0x31, 0x3e, 0x9d, 0x93, 0x1c, 0xd1, 0xfb, 0x50, 0x2d, 0x49, + 0x4f, 0xaa, 0x61, 0x52, 0x6a, 0x61, 0x4c, 0x3d, 0xfa, 0xb9, 0x16, 0x86, 0xda, 0x76, 0x6f, 0x54, + 0x9e, 0xf7, 0x46, 0xe5, 0x2e, 0x31, 0xc0, 0x36, 0x31, 0xc0, 0x63, 0x62, 0x80, 0x97, 0xc4, 0x00, + 0x0b, 0x45, 0xfc, 0xc5, 0x7f, 0x5f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x47, 0x2f, 0xd1, 0x73, 0x34, + 0x03, 0x00, 0x00, } diff --git a/api/types/event/container.proto b/api/types/event/container.proto index bc2a053de..eba13859b 100644 --- a/api/types/event/container.proto +++ b/api/types/event/container.proto @@ -7,7 +7,11 @@ import "gogoproto/gogo.proto"; message ContainerCreate { string container_id = 1; string image = 2; - string runtime = 3; + message Runtime { + string name = 1; + map options = 2; + } + Runtime runtime = 3; } message ContainerUpdate { diff --git a/api/types/event/image.pb.go b/api/types/event/image.pb.go index 73cd59c03..25dec7bf3 100644 --- a/api/types/event/image.pb.go +++ b/api/types/event/image.pb.go @@ -10,6 +10,7 @@ import math "math" import strings "strings" import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" import io "io" @@ -18,14 +19,14 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -type ImagePut struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Labels string `protobuf:"bytes,2,opt,name=labels,proto3" json:"labels,omitempty"` +type ImageUpdate struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *ImagePut) Reset() { *m = ImagePut{} } -func (*ImagePut) ProtoMessage() {} -func (*ImagePut) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} } +func (m *ImageUpdate) Reset() { *m = ImageUpdate{} } +func (*ImageUpdate) ProtoMessage() {} +func (*ImageUpdate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} } type ImageDelete struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -36,10 +37,10 @@ func (*ImageDelete) ProtoMessage() {} func (*ImageDelete) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{1} } func init() { - proto.RegisterType((*ImagePut)(nil), "containerd.v1.types.ImagePut") + proto.RegisterType((*ImageUpdate)(nil), "containerd.v1.types.ImageUpdate") proto.RegisterType((*ImageDelete)(nil), "containerd.v1.types.ImageDelete") } -func (m *ImagePut) Marshal() (dAtA []byte, err error) { +func (m *ImageUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalTo(dAtA) @@ -49,7 +50,7 @@ func (m *ImagePut) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ImagePut) MarshalTo(dAtA []byte) (int, error) { +func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int @@ -61,10 +62,21 @@ func (m *ImagePut) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], m.Name) } if len(m.Labels) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintImage(dAtA, i, uint64(len(m.Labels))) - i += copy(dAtA[i:], m.Labels) + for k, _ := range m.Labels { + dAtA[i] = 0x12 + i++ + v := m.Labels[k] + mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) + i = encodeVarintImage(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintImage(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintImage(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } } return i, nil } @@ -120,16 +132,20 @@ func encodeVarintImage(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } -func (m *ImagePut) Size() (n int) { +func (m *ImageUpdate) Size() (n int) { var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovImage(uint64(l)) } - l = len(m.Labels) - if l > 0 { - n += 1 + l + sovImage(uint64(l)) + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v))) + n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize)) + } } return n } @@ -157,13 +173,23 @@ func sovImage(x uint64) (n int) { func sozImage(x uint64) (n int) { return sovImage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *ImagePut) String() string { +func (this *ImageUpdate) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ImagePut{`, + keysForLabels := make([]string, 0, len(this.Labels)) + for k, _ := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]string{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + s := strings.Join([]string{`&ImageUpdate{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Labels:` + fmt.Sprintf("%v", this.Labels) + `,`, + `Labels:` + mapStringForLabels + `,`, `}`, }, "") return s @@ -186,7 +212,7 @@ func valueToStringImage(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *ImagePut) Unmarshal(dAtA []byte) error { +func (m *ImageUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -209,10 +235,10 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ImagePut: wiretype end group for non-group") + return fmt.Errorf("proto: ImageUpdate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ImagePut: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ImageUpdate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -248,7 +274,7 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowImage @@ -258,20 +284,107 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthImage } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = string(dAtA[iNdEx:postIndex]) + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthImage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Labels == nil { + m.Labels = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowImage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthImage + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Labels[mapkey] = mapvalue + } else { + var mapvalue string + m.Labels[mapkey] = mapvalue + } iNdEx = postIndex default: iNdEx = preIndex @@ -483,16 +596,20 @@ func init() { } var fileDescriptorImage = []byte{ - // 175 bytes of a gzipped FileDescriptorProto + // 232 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0xe8, 0x67, 0xe6, 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, - 0x23, 0xd4, 0xe9, 0x95, 0x19, 0xea, 0x81, 0x95, 0x29, 0x99, 0x71, 0x71, 0x78, 0x82, 0xd4, 0x04, - 0x94, 0x96, 0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, - 0x06, 0x81, 0xd9, 0x42, 0x62, 0x5c, 0x6c, 0x39, 0x89, 0x49, 0xa9, 0x39, 0xc5, 0x12, 0x4c, 0x60, - 0x51, 0x28, 0x4f, 0x49, 0x91, 0x8b, 0x1b, 0xac, 0xcf, 0x25, 0x35, 0x27, 0xb5, 0x24, 0x15, 0x9b, - 0x56, 0x27, 0x89, 0x13, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, - 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x1d, - 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x87, 0x34, 0x3a, 0xd0, 0x00, 0x00, 0x00, + 0x23, 0xd4, 0xe9, 0x95, 0x19, 0xea, 0x81, 0x95, 0x29, 0x2d, 0x62, 0xe4, 0xe2, 0xf6, 0x04, 0x29, + 0x0a, 0x2d, 0x48, 0x49, 0x2c, 0x49, 0x15, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x5c, 0xb8, 0xd8, 0x72, 0x12, 0x93, 0x52, 0x73, + 0x8a, 0x25, 0x98, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0x74, 0xf4, 0xb0, 0x98, 0xa4, 0x87, 0x64, 0x8a, + 0x9e, 0x0f, 0x58, 0xb9, 0x6b, 0x5e, 0x49, 0x51, 0x65, 0x10, 0x54, 0xaf, 0x94, 0x25, 0x17, 0x37, + 0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, 0x1e, 0x10, 0x53, 0x48, 0x84, 0x8b, + 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, 0xe1, 0x58, 0x31, 0x59, 0x30, 0x2a, + 0x29, 0x42, 0xdd, 0xe8, 0x92, 0x9a, 0x93, 0x8a, 0xdd, 0x8d, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, + 0xdc, 0x78, 0x28, 0xc7, 0xd0, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, + 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0xfb, 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, + 0xa7, 0x64, 0x49, 0x13, 0x3d, 0x01, 0x00, 0x00, } diff --git a/api/types/event/image.proto b/api/types/event/image.proto index 59b00f092..5df9e595a 100644 --- a/api/types/event/image.proto +++ b/api/types/event/image.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package containerd.v1.types; -message ImagePut { +message ImageUpdate { string name = 1; - string labels = 2; + map labels = 2; } message ImageDelete { diff --git a/client.go b/client.go index 96f97dc35..7e064c333 100644 --- a/client.go +++ b/client.go @@ -180,7 +180,9 @@ func WithNewReadonlyRootFS(id string, i Image) NewContainerOpts { func WithRuntime(name string) NewContainerOpts { return func(ctx context.Context, client *Client, c *containers.Container) error { - c.Runtime = name + c.Runtime = &containers.Container_Runtime{ + Name: name, + } return nil } } @@ -196,8 +198,10 @@ func WithImage(i Image) NewContainerOpts { // the id must be unique within the namespace func (c *Client) NewContainer(ctx context.Context, id string, opts ...NewContainerOpts) (Container, error) { container := containers.Container{ - ID: id, - Runtime: c.runtime, + ID: id, + Runtime: &containers.Container_Runtime{ + Name: c.runtime, + }, } for _, o := range opts { if err := o(ctx, c, &container); err != nil { @@ -331,7 +335,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpts) (Imag } is := c.ImageService() - if err := is.Put(ctx, name, desc); err != nil { + if err := is.Update(ctx, name, desc); err != nil { return nil, err } i, err := is.Get(ctx, name) @@ -448,7 +452,7 @@ func (c *Client) ContentStore() content.Store { } func (c *Client) SnapshotService() snapshot.Snapshotter { - return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotClient(c.conn)) + return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotsClient(c.conn)) } func (c *Client) TaskService() execution.TasksClient { diff --git a/client_test.go b/client_test.go index 11ada9555..4c3992209 100644 --- a/client_test.go +++ b/client_test.go @@ -27,7 +27,7 @@ var ( ) func init() { - flag.StringVar(&address, "address", "/run/containerd/containerd.sock", "The address to the containerd socket for use in the tests") + flag.StringVar(&address, "address", "/run/containerd-test/containerd.sock", "The address to the containerd socket for use in the tests") flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests") flag.Parse() } @@ -59,6 +59,7 @@ func TestMain(m *testing.M) { cmd = exec.Command("containerd", "--root", defaultRoot, "--state", defaultState, + "--address", address, ) cmd.Stderr = buf if err := cmd.Start(); err != nil { diff --git a/cmd/containerd/main.go b/cmd/containerd/main.go index 44975cc16..174a1d226 100644 --- a/cmd/containerd/main.go +++ b/cmd/containerd/main.go @@ -323,7 +323,7 @@ func interceptor(ctx gocontext.Context, // No need to change the context case versionapi.VersionServer: ctx = log.WithModule(ctx, "version") - case snapshotapi.SnapshotServer: + case snapshotapi.SnapshotsServer: ctx = log.WithModule(ctx, "snapshot") case diffapi.DiffServer: ctx = log.WithModule(ctx, "diff") diff --git a/cmd/ctr/events.go b/cmd/ctr/events.go index b75dedbc0..814381083 100644 --- a/cmd/ctr/events.go +++ b/cmd/ctr/events.go @@ -23,7 +23,7 @@ var eventsCommand = cli.Command{ ctx, cancel := appContext(context) defer cancel() - events, err := eventsClient.EventStream(ctx, &eventsapi.EventStreamRequest{}) + events, err := eventsClient.Stream(ctx, &eventsapi.StreamEventsRequest{}) if err != nil { return err } @@ -114,8 +114,8 @@ func getEventOutput(evt *event.Envelope) (string, error) { return out, err } out = "key=" + e.Key - case "types.containerd.io/containerd.v1.types.event.ImagePut": - e := &event.ImagePut{} + case "types.containerd.io/containerd.v1.types.event.ImageUpdate": + e := &event.ImageUpdate{} if err := proto.Unmarshal(evt.Event.Value, e); err != nil { return out, err } diff --git a/cmd/ctr/utils.go b/cmd/ctr/utils.go index db0491807..293339182 100644 --- a/cmd/ctr/utils.go +++ b/cmd/ctr/utils.go @@ -21,7 +21,6 @@ import ( namespacesapi "github.com/containerd/containerd/api/services/namespaces" snapshotapi "github.com/containerd/containerd/api/services/snapshot" versionservice "github.com/containerd/containerd/api/services/version" - "github.com/containerd/containerd/api/types/task" "github.com/containerd/containerd/content" "github.com/containerd/containerd/images" "github.com/containerd/containerd/namespaces" @@ -112,7 +111,7 @@ func getSnapshotter(context *cli.Context) (snapshot.Snapshotter, error) { if err != nil { return nil, err } - return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotClient(conn)), nil + return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotsClient(conn)), nil } func getImageStore(clicontext *cli.Context) (images.Store, error) { @@ -139,21 +138,6 @@ func getVersionService(context *cli.Context) (versionservice.VersionClient, erro return versionservice.NewVersionClient(conn), nil } -func waitContainer(events execution.Tasks_EventsClient, id string, pid uint32) (uint32, error) { - for { - e, err := events.Recv() - if err != nil { - return 255, err - } - if e.Type != task.Event_EXIT { - continue - } - if e.ID == id && e.Pid == pid { - return e.ExitStatus, nil - } - } -} - func forwardAllSignals(ctx gocontext.Context, task killer) chan os.Signal { sigc := make(chan os.Signal, 128) signal.Notify(sigc) diff --git a/cmd/dist/rootfs.go b/cmd/dist/rootfs.go index 3797e7367..fccb300fa 100644 --- a/cmd/dist/rootfs.go +++ b/cmd/dist/rootfs.go @@ -99,7 +99,6 @@ var rootfsPrepareCommand = cli.Command{ } snapshotter := client.SnapshotService() - mounts, err := snapshotter.Prepare(ctx, target, dgst.String()) if err != nil { return err diff --git a/container.go b/container.go index 935796255..ded6ebd36 100644 --- a/container.go +++ b/container.go @@ -104,7 +104,7 @@ func (c *container) Image(ctx context.Context) (Image, error) { }, nil } -type NewTaskOpts func(context.Context, *Client, *execution.CreateRequest) error +type NewTaskOpts func(context.Context, *Client, *execution.CreateTaskRequest) error func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...NewTaskOpts) (Task, error) { c.mu.Lock() @@ -113,7 +113,7 @@ func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...Ne if err != nil { return nil, err } - request := &execution.CreateRequest{ + request := &execution.CreateTaskRequest{ ContainerID: c.c.ID, Terminal: i.Terminal, Stdin: i.Stdin, @@ -161,7 +161,7 @@ func (c *container) NewTask(ctx context.Context, ioCreate IOCreation, opts ...Ne } func (c *container) loadTask(ctx context.Context, ioAttach IOAttach) (Task, error) { - response, err := c.client.TaskService().Info(ctx, &execution.InfoRequest{ + response, err := c.client.TaskService().Get(ctx, &execution.GetTaskRequest{ ContainerID: c.c.ID, }) if err != nil { diff --git a/container_test.go b/container_test.go index e2cc74e5d..ed56fb7e5 100644 --- a/container_test.go +++ b/container_test.go @@ -389,7 +389,7 @@ func TestContainerProcesses(t *testing.T) { <-statusC } -func TestContainerCloseStdin(t *testing.T) { +func TestContainerCloseIO(t *testing.T) { if testing.Short() { t.Skip() } @@ -456,7 +456,7 @@ func TestContainerCloseStdin(t *testing.T) { t.Error(err) } w.Close() - if err := task.CloseStdin(ctx); err != nil { + if err := task.CloseIO(ctx, WithStdinCloser); err != nil { t.Error(err) } @@ -576,7 +576,7 @@ func TestContainerAttach(t *testing.T) { } w.Close() - if err := task.CloseStdin(ctx); err != nil { + if err := task.CloseIO(ctx, WithStdinCloser); err != nil { t.Error(err) } diff --git a/container_unix.go b/container_unix.go index 8a97daa89..181ccc36c 100644 --- a/container_unix.go +++ b/container_unix.go @@ -83,7 +83,7 @@ func WithCheckpoint(desc v1.Descriptor, rootfsID string) NewContainerOpts { } func WithTaskCheckpoint(desc v1.Descriptor) NewTaskOpts { - return func(ctx context.Context, c *Client, r *execution.CreateRequest) error { + return func(ctx context.Context, c *Client, r *execution.CreateTaskRequest) error { id := desc.Digest index, err := decodeIndex(ctx, c.ContentStore(), id) if err != nil { diff --git a/containers/containers.go b/containers/containers.go index 7a899add4..6aec0ff1d 100644 --- a/containers/containers.go +++ b/containers/containers.go @@ -1,7 +1,10 @@ package containers import ( + "bytes" "context" + "encoding/gob" + "errors" "time" ) @@ -13,13 +16,35 @@ type Container struct { ID string Labels map[string]string Image string - Runtime string + Runtime RuntimeInfo Spec []byte RootFS string CreatedAt time.Time UpdatedAt time.Time } +type RuntimeInfo struct { + Name string + Options map[string]string +} + +func (r RuntimeInfo) MarshalBinary() ([]byte, error) { + buf := bytes.NewBuffer(nil) + if err := gob.NewEncoder(buf).Encode(r); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func (r RuntimeInfo) UnmarshalBinary(data []byte) error { + buf := data + if len(buf) == 0 { + return errors.New("RuntimeInfo: no data") + } + reader := bytes.NewReader(buf) + return gob.NewDecoder(reader).Decode(&r) +} + type Store interface { Get(ctx context.Context, id string) (Container, error) List(ctx context.Context, filter string) ([]Container, error) diff --git a/events/convert.go b/events/convert.go index 42f9a4a05..b7f2470a9 100644 --- a/events/convert.go +++ b/events/convert.go @@ -52,8 +52,8 @@ func convertToAny(evt Event) (*protobuf.Any, error) { case event.SnapshotRemove: url = getUrl("SnapshotRemove") pb = &v - case event.ImagePut: - url = getUrl("ImagePut") + case event.ImageUpdate: + url = getUrl("ImageUpdate") pb = &v case event.ImageDelete: url = getUrl("ImageDelete") diff --git a/images/image.go b/images/image.go index 256aec2a4..4e8780758 100644 --- a/images/image.go +++ b/images/image.go @@ -18,7 +18,7 @@ type Image struct { } type Store interface { - Put(ctx context.Context, name string, desc ocispec.Descriptor) error + Update(ctx context.Context, name string, desc ocispec.Descriptor) error Get(ctx context.Context, name string) (Image, error) List(ctx context.Context) ([]Image, error) Delete(ctx context.Context, name string) error diff --git a/linux/shim/init.go b/linux/shim/init.go index 11249c071..f6a42fc87 100644 --- a/linux/shim/init.go +++ b/linux/shim/init.go @@ -254,19 +254,24 @@ func (p *initProcess) Stdin() io.Closer { func (p *initProcess) Checkpoint(context context.Context, r *shimapi.CheckpointRequest) error { var actions []runc.CheckpointAction - if !r.Exit { - actions = append(actions, runc.LeaveRunning) - } + /* + if !r.Exit { + actions = append(actions, runc.LeaveRunning) + } + */ work := filepath.Join(p.bundle, "work") defer os.RemoveAll(work) + // TODO: convert options into runc flags or a better format for criu if err := p.runc.Checkpoint(context, p.id, &runc.CheckpointOpts{ - WorkDir: work, - ImagePath: r.CheckpointPath, - AllowOpenTCP: r.AllowTcp, - AllowExternalUnixSockets: r.AllowUnixSockets, - AllowTerminal: r.AllowTerminal, - FileLocks: r.FileLocks, - EmptyNamespaces: r.EmptyNamespaces, + WorkDir: work, + ImagePath: r.Path, + /* + AllowOpenTCP: r.AllowTcp, + AllowExternalUnixSockets: r.AllowUnixSockets, + AllowTerminal: r.AllowTerminal, + FileLocks: r.FileLocks, + EmptyNamespaces: r.EmptyNamespaces, + */ }, actions...); err != nil { dumpLog := filepath.Join(p.bundle, "criu-dump.log") if cerr := copyFile(dumpLog, filepath.Join(work, "dump.log")); cerr != nil { diff --git a/linux/task.go b/linux/task.go index a6f979d88..c378a6a78 100644 --- a/linux/task.go +++ b/linux/task.go @@ -165,20 +165,15 @@ func (t *Task) CloseStdin(ctx context.Context, pid uint32) error { return err } -func (t *Task) Checkpoint(ctx context.Context, opts plugin.CheckpointOpts) error { - _, err := t.shim.Checkpoint(ctx, &shim.CheckpointRequest{ - Exit: opts.Exit, - AllowTcp: opts.AllowTCP, - AllowUnixSockets: opts.AllowUnixSockets, - AllowTerminal: opts.AllowTerminal, - FileLocks: opts.FileLocks, - EmptyNamespaces: opts.EmptyNamespaces, - CheckpointPath: opts.Path, - }) - if err != nil { - err = errors.New(grpc.ErrorDesc(err)) +func (t *Task) Checkpoint(ctx context.Context, path string, options map[string]string) error { + r := &shim.CheckpointRequest{ + Path: path, + Options: options, } - return err + if _, err := t.shim.Checkpoint(ctx, r); err != nil { + return errors.New(grpc.ErrorDesc(err)) + } + return nil } func (t *Task) DeleteProcess(ctx context.Context, pid uint32) (*plugin.Exit, error) { diff --git a/metadata/containers.go b/metadata/containers.go index 37d1242bf..ae0e2e40e 100644 --- a/metadata/containers.go +++ b/metadata/containers.go @@ -146,7 +146,9 @@ func readContainer(container *containers.Container, bkt *bolt.Bucket) error { case string(bucketKeyImage): container.Image = string(v) case string(bucketKeyRuntime): - container.Runtime = string(v) + if err := container.Runtime.UnmarshalBinary(v); err != nil { + return err + } case string(bucketKeySpec): container.Spec = make([]byte, len(v)) copy(container.Spec, v) @@ -187,9 +189,13 @@ func writeContainer(container *containers.Container, bkt *bolt.Bucket) error { if err != nil { return err } + runtime, err := container.Runtime.MarshalBinary() + if err != nil { + return err + } for _, v := range [][2][]byte{ {bucketKeyImage, []byte(container.Image)}, - {bucketKeyRuntime, []byte(container.Runtime)}, + {bucketKeyRuntime, runtime}, {bucketKeySpec, container.Spec}, {bucketKeyRootFS, []byte(container.RootFS)}, {bucketKeyCreatedAt, createdAt}, diff --git a/metadata/images.go b/metadata/images.go index 788bb2f4d..1d0a6ba81 100644 --- a/metadata/images.go +++ b/metadata/images.go @@ -46,7 +46,7 @@ func (s *imageStore) Get(ctx context.Context, name string) (images.Image, error) return image, nil } -func (s *imageStore) Put(ctx context.Context, name string, desc ocispec.Descriptor) error { +func (s *imageStore) Update(ctx context.Context, name string, desc ocispec.Descriptor) error { namespace, err := namespaces.NamespaceRequired(ctx) if err != nil { return err diff --git a/plugin/container.go b/plugin/container.go index cce33b316..33e57ac85 100644 --- a/plugin/container.go +++ b/plugin/container.go @@ -32,21 +32,11 @@ type Task interface { // CloseStdin closes the processes stdin CloseStdin(context.Context, uint32) error // Checkpoint checkpoints a container to an image with live system data - Checkpoint(context.Context, CheckpointOpts) error + Checkpoint(context.Context, string, map[string]string) error // DeleteProcess deletes a specific exec process via the pid DeleteProcess(context.Context, uint32) (*Exit, error) } -type CheckpointOpts struct { - Exit bool - AllowTCP bool - AllowUnixSockets bool - AllowTerminal bool - FileLocks bool - EmptyNamespaces []string - Path string -} - type ExecOpts struct { Spec []byte IO IO diff --git a/process.go b/process.go index e4f3e092a..fdf11cb6b 100644 --- a/process.go +++ b/process.go @@ -3,10 +3,10 @@ package containerd import ( "context" "encoding/json" + "fmt" "syscall" "github.com/containerd/containerd/api/services/execution" - taskapi "github.com/containerd/containerd/api/types/task" protobuf "github.com/gogo/protobuf/types" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -38,7 +38,7 @@ func (p *process) Start(ctx context.Context) error { if err != nil { return err } - request := &execution.ExecRequest{ + request := &execution.ExecProcessRequest{ ContainerID: p.task.containerID, Terminal: p.io.Terminal, Stdin: p.io.Stdin, @@ -70,30 +70,18 @@ func (p *process) Kill(ctx context.Context, s syscall.Signal) error { } func (p *process) Wait(ctx context.Context) (uint32, error) { - events, err := p.task.client.TaskService().Events(ctx, &execution.EventsRequest{}) - if err != nil { - return UnknownExitStatus, err - } - <-p.pidSync - for { - e, err := events.Recv() - if err != nil { - return UnknownExitStatus, err - } - if e.Type != taskapi.Event_EXIT { - continue - } - if e.ID == p.task.containerID && e.Pid == p.pid { - return e.ExitStatus, nil - } - } + return 255, fmt.Errorf("not implemented") } -func (p *process) CloseStdin(ctx context.Context) error { - _, err := p.task.client.TaskService().CloseStdin(ctx, &execution.CloseStdinRequest{ +func (p *process) CloseIO(ctx context.Context, opts ...IOCloserOpts) error { + r := &execution.CloseIORequest{ ContainerID: p.task.containerID, Pid: p.pid, - }) + } + for _, o := range opts { + o(r) + } + _, err := p.task.client.TaskService().CloseIO(ctx, r) return err } @@ -102,7 +90,7 @@ func (p *process) IO() *IO { } func (p *process) Resize(ctx context.Context, w, h uint32) error { - _, err := p.task.client.TaskService().Pty(ctx, &execution.PtyRequest{ + _, err := p.task.client.TaskService().ResizePty(ctx, &execution.ResizePtyRequest{ ContainerID: p.task.containerID, Width: w, Height: h, diff --git a/services/containers/helpers.go b/services/containers/helpers.go index 525878ac5..69c8f5df8 100644 --- a/services/containers/helpers.go +++ b/services/containers/helpers.go @@ -22,10 +22,13 @@ func containersToProto(containers []containers.Container) []api.Container { func containerToProto(container *containers.Container) api.Container { return api.Container{ - ID: container.ID, - Labels: container.Labels, - Image: container.Image, - Runtime: container.Runtime, + ID: container.ID, + Labels: container.Labels, + Image: container.Image, + Runtime: &api.Container_Runtime{ + Name: container.Runtime.Name, + Options: container.Runtime.Options, + }, Spec: &types.Any{ TypeUrl: specs.Version, Value: container.Spec, @@ -36,12 +39,15 @@ func containerToProto(container *containers.Container) api.Container { func containerFromProto(containerpb *api.Container) containers.Container { return containers.Container{ - ID: containerpb.ID, - Labels: containerpb.Labels, - Image: containerpb.Image, - Runtime: containerpb.Runtime, - Spec: containerpb.Spec.Value, - RootFS: containerpb.RootFS, + ID: containerpb.ID, + Labels: containerpb.Labels, + Image: containerpb.Image, + Runtime: containers.RuntimeInfo{ + Name: containerpb.Runtime.Name, + Options: containerpb.Runtime.Options, + }, + Spec: containerpb.Spec.Value, + RootFS: containerpb.RootFS, } } diff --git a/services/containers/service.go b/services/containers/service.go index 7d9dfd3e1..3884ab977 100644 --- a/services/containers/service.go +++ b/services/containers/service.go @@ -96,7 +96,10 @@ func (s *Service) Create(ctx context.Context, req *api.CreateContainerRequest) ( if err := s.emit(ctx, "/containers/create", event.ContainerCreate{ ContainerID: resp.Container.ID, Image: resp.Container.Image, - Runtime: resp.Container.Runtime, + Runtime: &event.ContainerCreate_Runtime{ + Name: resp.Container.Runtime.Name, + Options: resp.Container.Runtime.Options, + }, }); err != nil { return &resp, err } diff --git a/services/content/reader.go b/services/content/reader.go index 7c22db987..b7a311b36 100644 --- a/services/content/reader.go +++ b/services/content/reader.go @@ -26,7 +26,7 @@ func (rr *remoteReader) Read(p []byte) (n int, err error) { p = p[n:] for len(p) > 0 { - var resp *contentapi.ReadResponse + var resp *contentapi.ReadContentResponse // fill our buffer up until we can fill p. resp, err = rr.client.Recv() if err != nil { @@ -56,7 +56,7 @@ type remoteReaderAt struct { } func (ra *remoteReaderAt) ReadAt(p []byte, off int64) (n int, err error) { - rr := &contentapi.ReadRequest{ + rr := &contentapi.ReadContentRequest{ Digest: ra.digest, Offset: off, Size_: int64(len(p)), @@ -67,7 +67,7 @@ func (ra *remoteReaderAt) ReadAt(p []byte, off int64) (n int, err error) { } for len(p) > 0 { - var resp *contentapi.ReadResponse + var resp *contentapi.ReadContentResponse // fill our buffer up until we can fill p. resp, err = rc.Recv() if err != nil { diff --git a/services/content/service.go b/services/content/service.go index 95e8d7dbb..20dc12a65 100644 --- a/services/content/service.go +++ b/services/content/service.go @@ -137,7 +137,7 @@ func (s *Service) Delete(ctx context.Context, req *api.DeleteContentRequest) (*e return &empty.Empty{}, nil } -func (s *Service) Read(req *api.ReadRequest, session api.Content_ReadServer) error { +func (s *Service) Read(req *api.ReadContentRequest, session api.Content_ReadServer) error { if err := req.Digest.Validate(); err != nil { return grpc.Errorf(codes.InvalidArgument, "%v: %v", req.Digest, err) } @@ -193,7 +193,7 @@ func (s *Service) Read(req *api.ReadRequest, session api.Content_ReadServer) err return nil } -// readResponseWriter is a writer that places the output into ReadResponse messages. +// readResponseWriter is a writer that places the output into ReadContentRequest messages. // // This allows io.CopyBuffer to do the heavy lifting of chunking the responses // into the buffer size. @@ -203,7 +203,7 @@ type readResponseWriter struct { } func (rw *readResponseWriter) Write(p []byte) (n int, err error) { - if err := rw.session.Send(&api.ReadResponse{ + if err := rw.session.Send(&api.ReadContentResponse{ Offset: rw.offset, Data: p, }); err != nil { @@ -215,9 +215,9 @@ func (rw *readResponseWriter) Write(p []byte) (n int, err error) { } func (s *Service) Status(ctx context.Context, req *api.StatusRequest) (*api.StatusResponse, error) { - statuses, err := s.store.Status(ctx, req.Regexp) + statuses, err := s.store.Status(ctx, req.Filter) if err != nil { - return nil, serverErrorToGRPC(err, req.Regexp) + return nil, serverErrorToGRPC(err, req.Filter) } var resp api.StatusResponse @@ -238,14 +238,14 @@ func (s *Service) Status(ctx context.Context, req *api.StatusRequest) (*api.Stat func (s *Service) Write(session api.Content_WriteServer) (err error) { var ( ctx = session.Context() - msg api.WriteResponse - req *api.WriteRequest + msg api.WriteContentResponse + req *api.WriteContentRequest ref string total int64 expected digest.Digest ) - defer func(msg *api.WriteResponse) { + defer func(msg *api.WriteContentResponse) { // pump through the last message if no error was encountered if err != nil { if grpc.Code(err) != codes.AlreadyExists { diff --git a/services/content/store.go b/services/content/store.go index 11ad37b0e..d191b62c9 100644 --- a/services/content/store.go +++ b/services/content/store.go @@ -75,7 +75,7 @@ func (rs *remoteStore) Delete(ctx context.Context, dgst digest.Digest) error { } func (rs *remoteStore) Reader(ctx context.Context, dgst digest.Digest) (io.ReadCloser, error) { - client, err := rs.client.Read(ctx, &contentapi.ReadRequest{Digest: dgst}) + client, err := rs.client.Read(ctx, &contentapi.ReadContentRequest{Digest: dgst}) if err != nil { return nil, err } @@ -93,9 +93,9 @@ func (rs *remoteStore) ReaderAt(ctx context.Context, dgst digest.Digest) (io.Rea }, nil } -func (rs *remoteStore) Status(ctx context.Context, re string) ([]content.Status, error) { +func (rs *remoteStore) Status(ctx context.Context, filter string) ([]content.Status, error) { resp, err := rs.client.Status(ctx, &contentapi.StatusRequest{ - Regexp: re, + Filter: filter, }) if err != nil { return nil, rewriteGRPCError(err) @@ -146,7 +146,7 @@ func (rs *remoteStore) negotiate(ctx context.Context, ref string, size int64, ex return nil, 0, err } - if err := wrclient.Send(&contentapi.WriteRequest{ + if err := wrclient.Send(&contentapi.WriteContentRequest{ Action: contentapi.WriteActionStat, Ref: ref, Total: size, diff --git a/services/content/writer.go b/services/content/writer.go index 6ea17ef1e..884de001f 100644 --- a/services/content/writer.go +++ b/services/content/writer.go @@ -17,7 +17,7 @@ type remoteWriter struct { } // send performs a synchronous req-resp cycle on the client. -func (rw *remoteWriter) send(req *contentapi.WriteRequest) (*contentapi.WriteResponse, error) { +func (rw *remoteWriter) send(req *contentapi.WriteContentRequest) (*contentapi.WriteContentResponse, error) { if err := rw.client.Send(req); err != nil { return nil, err } @@ -35,7 +35,7 @@ func (rw *remoteWriter) send(req *contentapi.WriteRequest) (*contentapi.WriteRes } func (rw *remoteWriter) Status() (content.Status, error) { - resp, err := rw.send(&contentapi.WriteRequest{ + resp, err := rw.send(&contentapi.WriteContentRequest{ Action: contentapi.WriteActionStat, }) if err != nil { @@ -57,7 +57,7 @@ func (rw *remoteWriter) Digest() digest.Digest { func (rw *remoteWriter) Write(p []byte) (n int, err error) { offset := rw.offset - resp, err := rw.send(&contentapi.WriteRequest{ + resp, err := rw.send(&contentapi.WriteContentRequest{ Action: contentapi.WriteActionWrite, Offset: offset, Data: p, @@ -79,7 +79,7 @@ func (rw *remoteWriter) Write(p []byte) (n int, err error) { } func (rw *remoteWriter) Commit(size int64, expected digest.Digest) error { - resp, err := rw.send(&contentapi.WriteRequest{ + resp, err := rw.send(&contentapi.WriteContentRequest{ Action: contentapi.WriteActionCommit, Total: size, Offset: rw.offset, diff --git a/services/events/service.go b/services/events/service.go index 5f155166e..4edc0ed08 100644 --- a/services/events/service.go +++ b/services/events/service.go @@ -35,7 +35,7 @@ func (s *Service) Register(server *grpc.Server) error { return nil } -func (s *Service) EventStream(req *api.EventStreamRequest, srv api.Events_EventStreamServer) error { +func (s *Service) Stream(req *api.StreamEventsRequest, srv api.Events_StreamServer) error { clientID := fmt.Sprintf("%d", time.Now().UnixNano()) for { e := <-s.emitter.Events(srv.Context(), clientID) diff --git a/services/execution/collector.go b/services/execution/collector.go deleted file mode 100644 index 5922500ac..000000000 --- a/services/execution/collector.go +++ /dev/null @@ -1,89 +0,0 @@ -package execution - -import ( - "sync" - - "github.com/containerd/containerd/plugin" - - "golang.org/x/net/context" -) - -func newCollector(ctx context.Context, runtimes map[string]plugin.Runtime) (*collector, error) { - c := &collector{ - context: ctx, - ch: make(chan *plugin.Event, 2048), - eventClients: make(map[*eventClient]struct{}), - } - for _, r := range runtimes { - if err := c.collect(r); err != nil { - return nil, err - } - } - // run the publisher - go c.publisher() - // run a goroutine that waits for the context to be done - // and closes the channel after all writes have finished - go c.waitDone() - return c, nil -} - -type eventClient struct { - eCh chan error - w *grpcEventWriter -} - -type collector struct { - mu sync.Mutex - wg sync.WaitGroup - - context context.Context - ch chan *plugin.Event - eventClients map[*eventClient]struct{} -} - -// collect collects events from the provided runtime -func (c *collector) collect(r plugin.Runtime) error { - c.wg.Add(1) - go func() { - defer c.wg.Done() - for e := range r.Events(c.context) { - c.ch <- e - } - }() - return nil -} - -func (c *collector) forward(w *grpcEventWriter) error { - client := &eventClient{ - w: w, - eCh: make(chan error, 1), - } - c.mu.Lock() - c.eventClients[client] = struct{}{} - c.mu.Unlock() - err := <-client.eCh - c.mu.Lock() - delete(c.eventClients, client) - c.mu.Unlock() - return err -} - -func (c *collector) publisher() { - for e := range c.ch { - c.mu.Lock() - for client := range c.eventClients { - if err := client.w.Write(e); err != nil { - client.eCh <- err - } - } - c.mu.Unlock() - } -} - -// waitDone waits for the context to finish, waits for all the goroutines to finish -// collecting grpc events from the shim, and closes the output channel -func (c *collector) waitDone() { - <-c.context.Done() - c.wg.Wait() - close(c.ch) -} diff --git a/services/execution/service.go b/services/execution/service.go index c6d14b040..8dda6c6d1 100644 --- a/services/execution/service.go +++ b/services/execution/service.go @@ -67,26 +67,20 @@ func New(ic *plugin.InitContext) (interface{}, error) { r := rr.(plugin.Runtime) runtimes[r.ID()] = r } - c, err := newCollector(ic.Context, runtimes) - if err != nil { - return nil, err - } e := events.GetPoster(ic.Context) return &Service{ - runtimes: runtimes, - db: m.(*bolt.DB), - collector: c, - store: ct.(content.Store), - emitter: e, + runtimes: runtimes, + db: m.(*bolt.DB), + store: ct.(content.Store), + emitter: e, }, nil } type Service struct { - runtimes map[string]plugin.Runtime - db *bolt.DB - collector *collector - store content.Store - emitter events.Poster + runtimes map[string]plugin.Runtime + db *bolt.DB + store content.Store + emitter events.Poster } func (s *Service) Register(server *grpc.Server) error { @@ -94,7 +88,7 @@ func (s *Service) Register(server *grpc.Server) error { return nil } -func (s *Service) Create(ctx context.Context, r *api.CreateRequest) (*api.CreateResponse, error) { +func (s *Service) Create(ctx context.Context, r *api.CreateTaskRequest) (*api.CreateTaskResponse, error) { var ( checkpointPath string err error @@ -152,7 +146,7 @@ func (s *Service) Create(ctx context.Context, r *api.CreateRequest) (*api.Create Options: m.Options, }) } - runtime, err := s.getRuntime(container.Runtime) + runtime, err := s.getRuntime(container.Runtime.Name) if err != nil { return nil, err } @@ -171,13 +165,13 @@ func (s *Service) Create(ctx context.Context, r *api.CreateRequest) (*api.Create return nil, err } - return &api.CreateResponse{ + return &api.CreateTaskResponse{ ContainerID: r.ContainerID, Pid: state.Pid, }, nil } -func (s *Service) Start(ctx context.Context, r *api.StartRequest) (*google_protobuf.Empty, error) { +func (s *Service) Start(ctx context.Context, r *api.StartTaskRequest) (*google_protobuf.Empty, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -195,7 +189,7 @@ func (s *Service) Start(ctx context.Context, r *api.StartRequest) (*google_proto return empty, nil } -func (s *Service) Delete(ctx context.Context, r *api.DeleteRequest) (*api.DeleteResponse, error) { +func (s *Service) Delete(ctx context.Context, r *api.DeleteTaskRequest) (*api.DeleteResponse, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -271,7 +265,7 @@ func taskFromContainerd(ctx context.Context, c plugin.Task) (*task.Task, error) }, nil } -func (s *Service) Info(ctx context.Context, r *api.InfoRequest) (*api.InfoResponse, error) { +func (s *Service) Get(ctx context.Context, r *api.GetTaskRequest) (*api.GetTaskResponse, error) { task, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -280,13 +274,13 @@ func (s *Service) Info(ctx context.Context, r *api.InfoRequest) (*api.InfoRespon if err != nil { return nil, err } - return &api.InfoResponse{ + return &api.GetTaskResponse{ Task: t, }, nil } -func (s *Service) List(ctx context.Context, r *api.ListRequest) (*api.ListResponse, error) { - resp := &api.ListResponse{} +func (s *Service) List(ctx context.Context, r *api.ListTasksRequest) (*api.ListTasksResponse, error) { + resp := &api.ListTasksResponse{} for _, r := range s.runtimes { tasks, err := r.Tasks(ctx) if err != nil { @@ -303,7 +297,7 @@ func (s *Service) List(ctx context.Context, r *api.ListRequest) (*api.ListRespon return resp, nil } -func (s *Service) Pause(ctx context.Context, r *api.PauseRequest) (*google_protobuf.Empty, error) { +func (s *Service) Pause(ctx context.Context, r *api.PauseTaskRequest) (*google_protobuf.Empty, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -315,7 +309,7 @@ func (s *Service) Pause(ctx context.Context, r *api.PauseRequest) (*google_proto return empty, nil } -func (s *Service) Resume(ctx context.Context, r *api.ResumeRequest) (*google_protobuf.Empty, error) { +func (s *Service) Resume(ctx context.Context, r *api.ResumeTaskRequest) (*google_protobuf.Empty, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -348,7 +342,7 @@ func (s *Service) Kill(ctx context.Context, r *api.KillRequest) (*google_protobu return empty, nil } -func (s *Service) Processes(ctx context.Context, r *api.ProcessesRequest) (*api.ProcessesResponse, error) { +func (s *Service) ListProcesses(ctx context.Context, r *api.ListProcessesRequest) (*api.ListProcessesResponse, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -365,22 +359,12 @@ func (s *Service) Processes(ctx context.Context, r *api.ProcessesRequest) (*api. Pid: pid, }) } - - resp := &api.ProcessesResponse{ + return &api.ListProcessesResponse{ Processes: ps, - } - - return resp, nil + }, nil } -func (s *Service) Events(r *api.EventsRequest, server api.Tasks_EventsServer) error { - w := &grpcEventWriter{ - server: server, - } - return s.collector.forward(w) -} - -func (s *Service) Exec(ctx context.Context, r *api.ExecRequest) (*api.ExecResponse, error) { +func (s *Service) Exec(ctx context.Context, r *api.ExecProcessRequest) (*api.ExecProcessResponse, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -401,12 +385,12 @@ func (s *Service) Exec(ctx context.Context, r *api.ExecRequest) (*api.ExecRespon if err != nil { return nil, err } - return &api.ExecResponse{ + return &api.ExecProcessResponse{ Pid: state.Pid, }, nil } -func (s *Service) Pty(ctx context.Context, r *api.PtyRequest) (*google_protobuf.Empty, error) { +func (s *Service) ResizePty(ctx context.Context, r *api.ResizePtyRequest) (*google_protobuf.Empty, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -420,18 +404,20 @@ func (s *Service) Pty(ctx context.Context, r *api.PtyRequest) (*google_protobuf. return empty, nil } -func (s *Service) CloseStdin(ctx context.Context, r *api.CloseStdinRequest) (*google_protobuf.Empty, error) { +func (s *Service) CloseIO(ctx context.Context, r *api.CloseIORequest) (*google_protobuf.Empty, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err } - if err := t.CloseStdin(ctx, r.Pid); err != nil { - return nil, err + if r.Stdin { + if err := t.CloseStdin(ctx, r.Pid); err != nil { + return nil, err + } } return empty, nil } -func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointRequest) (*api.CheckpointResponse, error) { +func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest) (*api.CheckpointTaskResponse, error) { t, err := s.getTask(ctx, r.ContainerID) if err != nil { return nil, err @@ -441,16 +427,7 @@ func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointRequest) (*ap return nil, err } defer os.RemoveAll(image) - if err := t.Checkpoint(ctx, plugin.CheckpointOpts{ - Exit: r.Exit, - AllowTCP: r.AllowTcp, - AllowTerminal: r.AllowTerminal, - AllowUnixSockets: r.AllowUnixSockets, - FileLocks: r.FileLocks, - // ParentImage: r.ParentImage, - EmptyNamespaces: r.EmptyNamespaces, - Path: image, - }); err != nil { + if err := t.Checkpoint(ctx, image, r.Options); err != nil { return nil, err } // write checkpoint to the content store @@ -469,7 +446,7 @@ func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointRequest) (*ap if err != nil { return nil, err } - return &api.CheckpointResponse{ + return &api.CheckpointTaskResponse{ Descriptors: []*descriptor.Descriptor{ cp, specD, @@ -523,31 +500,3 @@ func (s *Service) emit(ctx context.Context, topic string, evt interface{}) error return nil } - -type grpcEventWriter struct { - server api.Tasks_EventsServer -} - -func (g *grpcEventWriter) Write(e *plugin.Event) error { - var t task.Event_EventType - switch e.Type { - case plugin.ExitEvent: - t = task.Event_EXIT - case plugin.ExecAddEvent: - t = task.Event_EXEC_ADDED - case plugin.PausedEvent: - t = task.Event_PAUSED - case plugin.CreateEvent: - t = task.Event_CREATE - case plugin.StartEvent: - t = task.Event_START - case plugin.OOMEvent: - t = task.Event_OOM - } - return g.server.Send(&task.Event{ - Type: t, - ID: e.ID, - Pid: e.Pid, - ExitStatus: e.ExitStatus, - }) -} diff --git a/services/images/client.go b/services/images/client.go index 3e47f0336..d12d1c09f 100644 --- a/services/images/client.go +++ b/services/images/client.go @@ -18,10 +18,10 @@ func NewStoreFromClient(client imagesapi.ImagesClient) images.Store { } } -func (s *remoteStore) Put(ctx context.Context, name string, desc ocispec.Descriptor) error { +func (s *remoteStore) Update(ctx context.Context, name string, desc ocispec.Descriptor) error { // TODO(stevvooe): Consider that the remote may want to augment and return // a modified image. - _, err := s.client.Put(ctx, &imagesapi.PutRequest{ + _, err := s.client.Update(ctx, &imagesapi.UpdateImageRequest{ Image: imagesapi.Image{ Name: name, Target: descToProto(&desc), @@ -32,7 +32,7 @@ func (s *remoteStore) Put(ctx context.Context, name string, desc ocispec.Descrip } func (s *remoteStore) Get(ctx context.Context, name string) (images.Image, error) { - resp, err := s.client.Get(ctx, &imagesapi.GetRequest{ + resp, err := s.client.Get(ctx, &imagesapi.GetImageRequest{ Name: name, }) if err != nil { @@ -43,7 +43,7 @@ func (s *remoteStore) Get(ctx context.Context, name string) (images.Image, error } func (s *remoteStore) List(ctx context.Context) ([]images.Image, error) { - resp, err := s.client.List(ctx, &imagesapi.ListRequest{}) + resp, err := s.client.List(ctx, &imagesapi.ListImagesRequest{}) if err != nil { return nil, rewriteGRPCError(err) } @@ -52,7 +52,7 @@ func (s *remoteStore) List(ctx context.Context) ([]images.Image, error) { } func (s *remoteStore) Delete(ctx context.Context, name string) error { - _, err := s.client.Delete(ctx, &imagesapi.DeleteRequest{ + _, err := s.client.Delete(ctx, &imagesapi.DeleteImageRequest{ Name: name, }) diff --git a/services/images/service.go b/services/images/service.go index 3d6d38559..31d9fd538 100644 --- a/services/images/service.go +++ b/services/images/service.go @@ -48,8 +48,8 @@ func (s *Service) Register(server *grpc.Server) error { return nil } -func (s *Service) Get(ctx context.Context, req *imagesapi.GetRequest) (*imagesapi.GetResponse, error) { - var resp imagesapi.GetResponse +func (s *Service) Get(ctx context.Context, req *imagesapi.GetImageRequest) (*imagesapi.GetImageResponse, error) { + var resp imagesapi.GetImageResponse return &resp, s.withStoreView(ctx, func(ctx context.Context, store images.Store) error { image, err := store.Get(ctx, req.Name) @@ -62,25 +62,28 @@ func (s *Service) Get(ctx context.Context, req *imagesapi.GetRequest) (*imagesap }) } -func (s *Service) Put(ctx context.Context, req *imagesapi.PutRequest) (*empty.Empty, error) { +func (s *Service) Update(ctx context.Context, req *imagesapi.UpdateImageRequest) (*imagesapi.UpdateImageResponse, error) { if err := s.withStoreUpdate(ctx, func(ctx context.Context, store images.Store) error { - return mapGRPCError(store.Put(ctx, req.Image.Name, descFromProto(&req.Image.Target)), req.Image.Name) + return mapGRPCError(store.Update(ctx, req.Image.Name, descFromProto(&req.Image.Target)), req.Image.Name) }); err != nil { - return &empty.Empty{}, err + return nil, err } - if err := s.emit(ctx, "/images/put", event.ImagePut{ + if err := s.emit(ctx, "/images/update", event.ImageUpdate{ Name: req.Image.Name, Labels: req.Image.Labels, }); err != nil { - return &empty.Empty{}, err + return nil, err } - return &empty.Empty{}, nil + // TODO: get image back out to return + return &imagesapi.UpdateImageResponse{ + //Image: nil, + }, nil } -func (s *Service) List(ctx context.Context, _ *imagesapi.ListRequest) (*imagesapi.ListResponse, error) { - var resp imagesapi.ListResponse +func (s *Service) List(ctx context.Context, _ *imagesapi.ListImagesRequest) (*imagesapi.ListImagesResponse, error) { + var resp imagesapi.ListImagesResponse return &resp, s.withStoreView(ctx, func(ctx context.Context, store images.Store) error { images, err := store.List(ctx) @@ -93,17 +96,17 @@ func (s *Service) List(ctx context.Context, _ *imagesapi.ListRequest) (*imagesap }) } -func (s *Service) Delete(ctx context.Context, req *imagesapi.DeleteRequest) (*empty.Empty, error) { +func (s *Service) Delete(ctx context.Context, req *imagesapi.DeleteImageRequest) (*empty.Empty, error) { if err := s.withStoreUpdate(ctx, func(ctx context.Context, store images.Store) error { return mapGRPCError(store.Delete(ctx, req.Name), req.Name) }); err != nil { - return &empty.Empty{}, err + return nil, err } if err := s.emit(ctx, "/images/delete", event.ImageDelete{ Name: req.Name, }); err != nil { - return &empty.Empty{}, err + return nil, err } return &empty.Empty{}, nil diff --git a/services/snapshot/client.go b/services/snapshot/client.go index 747aeb6ee..96124b7ac 100644 --- a/services/snapshot/client.go +++ b/services/snapshot/client.go @@ -9,6 +9,7 @@ import ( "google.golang.org/grpc/codes" snapshotapi "github.com/containerd/containerd/api/services/snapshot" + mountapi "github.com/containerd/containerd/api/types/mount" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/snapshot" "github.com/pkg/errors" @@ -16,18 +17,18 @@ import ( // NewSnapshotterFromClient returns a new Snapshotter which communicates // over a GRPC connection. -func NewSnapshotterFromClient(client snapshotapi.SnapshotClient) snapshot.Snapshotter { +func NewSnapshotterFromClient(client snapshotapi.SnapshotsClient) snapshot.Snapshotter { return &remoteSnapshotter{ client: client, } } type remoteSnapshotter struct { - client snapshotapi.SnapshotClient + client snapshotapi.SnapshotsClient } func (r *remoteSnapshotter) Stat(ctx context.Context, key string) (snapshot.Info, error) { - resp, err := r.client.Stat(ctx, &snapshotapi.StatRequest{Key: key}) + resp, err := r.client.Stat(ctx, &snapshotapi.StatSnapshotRequest{Key: key}) if err != nil { return snapshot.Info{}, rewriteGRPCError(err) } @@ -47,27 +48,27 @@ func (r *remoteSnapshotter) Mounts(ctx context.Context, key string) ([]mount.Mou if err != nil { return nil, rewriteGRPCError(err) } - return toMounts(resp), nil + return toMounts(resp.Mounts), nil } func (r *remoteSnapshotter) Prepare(ctx context.Context, key, parent string) ([]mount.Mount, error) { - resp, err := r.client.Prepare(ctx, &snapshotapi.PrepareRequest{Key: key, Parent: parent}) + resp, err := r.client.Prepare(ctx, &snapshotapi.PrepareSnapshotRequest{Key: key, Parent: parent}) if err != nil { return nil, rewriteGRPCError(err) } - return toMounts(resp), nil + return toMounts(resp.Mounts), nil } func (r *remoteSnapshotter) View(ctx context.Context, key, parent string) ([]mount.Mount, error) { - resp, err := r.client.View(ctx, &snapshotapi.PrepareRequest{Key: key, Parent: parent}) + resp, err := r.client.View(ctx, &snapshotapi.ViewSnapshotRequest{Key: key, Parent: parent}) if err != nil { return nil, rewriteGRPCError(err) } - return toMounts(resp), nil + return toMounts(resp.Mounts), nil } func (r *remoteSnapshotter) Commit(ctx context.Context, name, key string) error { - _, err := r.client.Commit(ctx, &snapshotapi.CommitRequest{ + _, err := r.client.Commit(ctx, &snapshotapi.CommitSnapshotRequest{ Name: name, Key: key, }) @@ -75,12 +76,12 @@ func (r *remoteSnapshotter) Commit(ctx context.Context, name, key string) error } func (r *remoteSnapshotter) Remove(ctx context.Context, key string) error { - _, err := r.client.Remove(ctx, &snapshotapi.RemoveRequest{Key: key}) + _, err := r.client.Remove(ctx, &snapshotapi.RemoveSnapshotRequest{Key: key}) return rewriteGRPCError(err) } func (r *remoteSnapshotter) Walk(ctx context.Context, fn func(context.Context, snapshot.Info) error) error { - sc, err := r.client.List(ctx, &snapshotapi.ListRequest{}) + sc, err := r.client.List(ctx, &snapshotapi.ListSnapshotsRequest{}) if err != nil { rewriteGRPCError(err) } @@ -145,9 +146,9 @@ func toUsage(resp *snapshotapi.UsageResponse) snapshot.Usage { } } -func toMounts(resp *snapshotapi.MountsResponse) []mount.Mount { - mounts := make([]mount.Mount, len(resp.Mounts)) - for i, m := range resp.Mounts { +func toMounts(mm []*mountapi.Mount) []mount.Mount { + mounts := make([]mount.Mount, len(mm)) + for i, m := range mm { mounts[i] = mount.Mount{ Type: m.Type, Source: m.Source, diff --git a/services/snapshot/service.go b/services/snapshot/service.go index f4688cb86..e2ecd6948 100644 --- a/services/snapshot/service.go +++ b/services/snapshot/service.go @@ -50,11 +50,11 @@ func newService(snapshotter snapshot.Snapshotter, evts events.Poster) (*service, } func (s *service) Register(gs *grpc.Server) error { - snapshotapi.RegisterSnapshotServer(gs, s) + snapshotapi.RegisterSnapshotsServer(gs, s) return nil } -func (s *service) Prepare(ctx context.Context, pr *snapshotapi.PrepareRequest) (*snapshotapi.MountsResponse, error) { +func (s *service) Prepare(ctx context.Context, pr *snapshotapi.PrepareSnapshotRequest) (*snapshotapi.PrepareSnapshotResponse, error) { log.G(ctx).WithField("parent", pr.Parent).WithField("key", pr.Key).Debugf("Preparing snapshot") // TODO: Apply namespace // TODO: Lookup snapshot id from metadata store @@ -69,11 +69,12 @@ func (s *service) Prepare(ctx context.Context, pr *snapshotapi.PrepareRequest) ( }); err != nil { return nil, err } - - return fromMounts(mounts), nil + return &snapshotapi.PrepareSnapshotResponse{ + Mounts: fromMounts(mounts), + }, nil } -func (s *service) View(ctx context.Context, pr *snapshotapi.PrepareRequest) (*snapshotapi.MountsResponse, error) { +func (s *service) View(ctx context.Context, pr *snapshotapi.ViewSnapshotRequest) (*snapshotapi.ViewSnapshotResponse, error) { log.G(ctx).WithField("parent", pr.Parent).WithField("key", pr.Key).Debugf("Preparing view snapshot") // TODO: Apply namespace // TODO: Lookup snapshot id from metadata store @@ -81,7 +82,9 @@ func (s *service) View(ctx context.Context, pr *snapshotapi.PrepareRequest) (*sn if err != nil { return nil, grpcError(err) } - return fromMounts(mounts), nil + return &snapshotapi.ViewSnapshotResponse{ + Mounts: fromMounts(mounts), + }, nil } func (s *service) Mounts(ctx context.Context, mr *snapshotapi.MountsRequest) (*snapshotapi.MountsResponse, error) { @@ -92,10 +95,12 @@ func (s *service) Mounts(ctx context.Context, mr *snapshotapi.MountsRequest) (*s if err != nil { return nil, grpcError(err) } - return fromMounts(mounts), nil + return &snapshotapi.MountsResponse{ + Mounts: fromMounts(mounts), + }, nil } -func (s *service) Commit(ctx context.Context, cr *snapshotapi.CommitRequest) (*protoempty.Empty, error) { +func (s *service) Commit(ctx context.Context, cr *snapshotapi.CommitSnapshotRequest) (*protoempty.Empty, error) { log.G(ctx).WithField("key", cr.Key).WithField("name", cr.Name).Debugf("Committing snapshot") // TODO: Apply namespace // TODO: Lookup snapshot id from metadata store @@ -112,7 +117,7 @@ func (s *service) Commit(ctx context.Context, cr *snapshotapi.CommitRequest) (*p return empty, nil } -func (s *service) Remove(ctx context.Context, rr *snapshotapi.RemoveRequest) (*protoempty.Empty, error) { +func (s *service) Remove(ctx context.Context, rr *snapshotapi.RemoveSnapshotRequest) (*protoempty.Empty, error) { log.G(ctx).WithField("key", rr.Key).Debugf("Removing snapshot") // TODO: Apply namespace // TODO: Lookup snapshot id from metadata store @@ -128,7 +133,7 @@ func (s *service) Remove(ctx context.Context, rr *snapshotapi.RemoveRequest) (*p return empty, nil } -func (s *service) Stat(ctx context.Context, sr *snapshotapi.StatRequest) (*snapshotapi.StatResponse, error) { +func (s *service) Stat(ctx context.Context, sr *snapshotapi.StatSnapshotRequest) (*snapshotapi.StatSnapshotResponse, error) { log.G(ctx).WithField("key", sr.Key).Debugf("Statting snapshot") // TODO: Apply namespace info, err := s.snapshotter.Stat(ctx, sr.Key) @@ -136,16 +141,15 @@ func (s *service) Stat(ctx context.Context, sr *snapshotapi.StatRequest) (*snaps return nil, grpcError(err) } - return &snapshotapi.StatResponse{Info: fromInfo(info)}, nil + return &snapshotapi.StatSnapshotResponse{Info: fromInfo(info)}, nil } -func (s *service) List(sr *snapshotapi.ListRequest, ss snapshotapi.Snapshot_ListServer) error { +func (s *service) List(sr *snapshotapi.ListSnapshotsRequest, ss snapshotapi.Snapshots_ListServer) error { // TODO: Apply namespace - var ( buffer []snapshotapi.Info sendBlock = func(block []snapshotapi.Info) error { - return ss.Send(&snapshotapi.ListResponse{ + return ss.Send(&snapshotapi.ListSnapshotsResponse{ Info: block, }) } @@ -223,18 +227,16 @@ func fromUsage(usage snapshot.Usage) *snapshotapi.UsageResponse { } } -func fromMounts(mounts []mount.Mount) *snapshotapi.MountsResponse { - resp := &snapshotapi.MountsResponse{ - Mounts: make([]*mounttypes.Mount, len(mounts)), - } +func fromMounts(mounts []mount.Mount) []*mounttypes.Mount { + out := make([]*mounttypes.Mount, len(mounts)) for i, m := range mounts { - resp.Mounts[i] = &mounttypes.Mount{ + out[i] = &mounttypes.Mount{ Type: m.Type, Source: m.Source, Options: m.Options, } } - return resp + return out } func (s *service) emit(ctx context.Context, topic string, evt interface{}) error { diff --git a/task.go b/task.go index 77570ad1d..e15c35c9e 100644 --- a/task.go +++ b/task.go @@ -12,7 +12,6 @@ import ( "github.com/containerd/containerd/api/services/containers" "github.com/containerd/containerd/api/services/execution" - taskapi "github.com/containerd/containerd/api/types/task" "github.com/containerd/containerd/content" "github.com/containerd/containerd/rootfs" "github.com/opencontainers/image-spec/specs-go/v1" @@ -31,7 +30,13 @@ const ( Pausing TaskStatus = "pausing" ) -type CheckpointOpts func(*execution.CheckpointRequest) error +type IOCloserOpts func(*execution.CloseIORequest) + +func WithStdinCloser(r *execution.CloseIORequest) { + r.Stdin = true +} + +type CheckpointOpts func(*execution.CheckpointTaskRequest) error type Task interface { Pid() uint32 @@ -44,7 +49,7 @@ type Task interface { Wait(context.Context) (uint32, error) Exec(context.Context, *specs.Process, IOCreation) (Process, error) Processes(context.Context) ([]uint32, error) - CloseStdin(context.Context) error + CloseIO(context.Context, ...IOCloserOpts) error Resize(ctx context.Context, w, h uint32) error IO() *IO Checkpoint(context.Context, ...CheckpointOpts) (v1.Descriptor, error) @@ -56,7 +61,7 @@ type Process interface { Delete(context.Context) (uint32, error) Kill(context.Context, syscall.Signal) error Wait(context.Context) (uint32, error) - CloseStdin(context.Context) error + CloseIO(context.Context, ...IOCloserOpts) error Resize(ctx context.Context, w, h uint32) error IO() *IO } @@ -70,7 +75,7 @@ type task struct { containerID string pid uint32 - deferred *execution.CreateRequest + deferred *execution.CreateTaskRequest pidSync chan struct{} } @@ -90,7 +95,7 @@ func (t *task) Start(ctx context.Context) error { close(t.pidSync) return nil } - _, err := t.client.TaskService().Start(ctx, &execution.StartRequest{ + _, err := t.client.TaskService().Start(ctx, &execution.StartTaskRequest{ ContainerID: t.containerID, }) return err @@ -108,21 +113,21 @@ func (t *task) Kill(ctx context.Context, s syscall.Signal) error { } func (t *task) Pause(ctx context.Context) error { - _, err := t.client.TaskService().Pause(ctx, &execution.PauseRequest{ + _, err := t.client.TaskService().Pause(ctx, &execution.PauseTaskRequest{ ContainerID: t.containerID, }) return err } func (t *task) Resume(ctx context.Context) error { - _, err := t.client.TaskService().Resume(ctx, &execution.ResumeRequest{ + _, err := t.client.TaskService().Resume(ctx, &execution.ResumeTaskRequest{ ContainerID: t.containerID, }) return err } func (t *task) Status(ctx context.Context) (TaskStatus, error) { - r, err := t.client.TaskService().Info(ctx, &execution.InfoRequest{ + r, err := t.client.TaskService().Get(ctx, &execution.GetTaskRequest{ ContainerID: t.containerID, }) if err != nil { @@ -133,23 +138,7 @@ func (t *task) Status(ctx context.Context) (TaskStatus, error) { // Wait is a blocking call that will wait for the task to exit and return the exit status func (t *task) Wait(ctx context.Context) (uint32, error) { - events, err := t.client.TaskService().Events(ctx, &execution.EventsRequest{}) - if err != nil { - return UnknownExitStatus, err - } - <-t.pidSync - for { - e, err := events.Recv() - if err != nil { - return UnknownExitStatus, err - } - if e.Type != taskapi.Event_EXIT { - continue - } - if e.ID == t.containerID && e.Pid == t.pid { - return e.ExitStatus, nil - } - } + return 255, fmt.Errorf("not implemented") } // Delete deletes the task and its runtime state @@ -160,7 +149,7 @@ func (t *task) Delete(ctx context.Context) (uint32, error) { if t.io != nil { cerr = t.io.Close() } - r, err := t.client.TaskService().Delete(ctx, &execution.DeleteRequest{ + r, err := t.client.TaskService().Delete(ctx, &execution.DeleteTaskRequest{ ContainerID: t.containerID, }) if err != nil { @@ -183,7 +172,7 @@ func (t *task) Exec(ctx context.Context, spec *specs.Process, ioCreate IOCreatio } func (t *task) Processes(ctx context.Context) ([]uint32, error) { - response, err := t.client.TaskService().Processes(ctx, &execution.ProcessesRequest{ + response, err := t.client.TaskService().ListProcesses(ctx, &execution.ListProcessesRequest{ ContainerID: t.containerID, }) if err != nil { @@ -196,11 +185,15 @@ func (t *task) Processes(ctx context.Context) ([]uint32, error) { return out, nil } -func (t *task) CloseStdin(ctx context.Context) error { - _, err := t.client.TaskService().CloseStdin(ctx, &execution.CloseStdinRequest{ +func (t *task) CloseIO(ctx context.Context, opts ...IOCloserOpts) error { + r := &execution.CloseIORequest{ ContainerID: t.containerID, Pid: t.pid, - }) + } + for _, o := range opts { + o(r) + } + _, err := t.client.TaskService().CloseIO(ctx, r) return err } @@ -209,7 +202,7 @@ func (t *task) IO() *IO { } func (t *task) Resize(ctx context.Context, w, h uint32) error { - _, err := t.client.TaskService().Pty(ctx, &execution.PtyRequest{ + _, err := t.client.TaskService().ResizePty(ctx, &execution.ResizePtyRequest{ ContainerID: t.containerID, Width: w, Height: h, @@ -218,28 +211,26 @@ func (t *task) Resize(ctx context.Context, w, h uint32) error { return err } -func WithExit(r *execution.CheckpointRequest) error { - r.Exit = true +func WithExit(r *execution.CheckpointTaskRequest) error { + r.Options["exit"] = "true" return nil } func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointOpts) (d v1.Descriptor, err error) { - request := &execution.CheckpointRequest{ + request := &execution.CheckpointTaskRequest{ ContainerID: t.containerID, + Options: make(map[string]string), } for _, o := range opts { if err := o(request); err != nil { return d, err } } - // if we are not exiting the container after the checkpoint, make sure we pause it and resume after - // all other filesystem operations are completed - if !request.Exit { - if err := t.Pause(ctx); err != nil { - return d, err - } - defer t.Resume(ctx) + // make sure we pause it and resume after all other filesystem operations are completed + if err := t.Pause(ctx); err != nil { + return d, err } + defer t.Resume(ctx) cr, err := t.client.ContainerService().Get(ctx, &containers.GetContainerRequest{ ID: t.containerID, }) @@ -261,7 +252,7 @@ func (t *task) Checkpoint(ctx context.Context, opts ...CheckpointOpts) (d v1.Des return t.writeIndex(ctx, &index) } -func (t *task) checkpointTask(ctx context.Context, index *v1.Index, request *execution.CheckpointRequest) error { +func (t *task) checkpointTask(ctx context.Context, index *v1.Index, request *execution.CheckpointTaskRequest) error { response, err := t.client.TaskService().Checkpoint(ctx, request) if err != nil { return err