PsRequest/PsResponse -> ProcessesRequest/ProcessesResponse; added Any to types.Process

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2017-05-16 16:14:52 -04:00
parent ef158f8b5e
commit 395d21018f
6 changed files with 232 additions and 352 deletions

View File

@ -25,9 +25,8 @@
CloseStdinRequest CloseStdinRequest
PauseRequest PauseRequest
ResumeRequest ResumeRequest
PsRequest ProcessesRequest
Ps ProcessesResponse
PsResponse
*/ */
package execution package execution
@ -322,30 +321,21 @@ func (m *ResumeRequest) Reset() { *m = ResumeRequest{} }
func (*ResumeRequest) ProtoMessage() {} func (*ResumeRequest) ProtoMessage() {}
func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} } func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{15} }
type PsRequest struct { type ProcessesRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
} }
func (m *PsRequest) Reset() { *m = PsRequest{} } func (m *ProcessesRequest) Reset() { *m = ProcessesRequest{} }
func (*PsRequest) ProtoMessage() {} func (*ProcessesRequest) ProtoMessage() {}
func (*PsRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{16} } func (*ProcessesRequest) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{16} }
type Ps struct { type ProcessesResponse struct {
Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` Processes []*containerd_v1_types1.Process `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"`
RuntimeData *google_protobuf1.Any `protobuf:"bytes,2,opt,name=runtime_data,json=runtimeData" json:"runtime_data,omitempty"`
} }
func (m *Ps) Reset() { *m = Ps{} } func (m *ProcessesResponse) Reset() { *m = ProcessesResponse{} }
func (*Ps) ProtoMessage() {} func (*ProcessesResponse) ProtoMessage() {}
func (*Ps) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{17} } func (*ProcessesResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{17} }
type PsResponse struct {
Ps []*Ps `protobuf:"bytes,1,rep,name=ps" json:"ps,omitempty"`
}
func (m *PsResponse) Reset() { *m = PsResponse{} }
func (*PsResponse) ProtoMessage() {}
func (*PsResponse) Descriptor() ([]byte, []int) { return fileDescriptorExecution, []int{18} }
func init() { func init() {
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.CreateRequest") proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.CreateRequest")
@ -364,9 +354,8 @@ func init() {
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.CloseStdinRequest") proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.CloseStdinRequest")
proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.PauseRequest") proto.RegisterType((*PauseRequest)(nil), "containerd.v1.services.PauseRequest")
proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.ResumeRequest") proto.RegisterType((*ResumeRequest)(nil), "containerd.v1.services.ResumeRequest")
proto.RegisterType((*PsRequest)(nil), "containerd.v1.services.PsRequest") proto.RegisterType((*ProcessesRequest)(nil), "containerd.v1.services.ProcessesRequest")
proto.RegisterType((*Ps)(nil), "containerd.v1.services.Ps") proto.RegisterType((*ProcessesResponse)(nil), "containerd.v1.services.ProcessesResponse")
proto.RegisterType((*PsResponse)(nil), "containerd.v1.services.PsResponse")
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -392,7 +381,7 @@ type ContainerServiceClient interface {
CloseStdin(ctx context.Context, in *CloseStdinRequest, 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) 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) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error)
} }
type containerServiceClient struct { type containerServiceClient struct {
@ -534,9 +523,9 @@ func (c *containerServiceClient) Resume(ctx context.Context, in *ResumeRequest,
return out, nil return out, nil
} }
func (c *containerServiceClient) Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) { func (c *containerServiceClient) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error) {
out := new(PsResponse) out := new(ProcessesResponse)
err := grpc.Invoke(ctx, "/containerd.v1.services.ContainerService/Ps", in, out, c.cc, opts...) err := grpc.Invoke(ctx, "/containerd.v1.services.ContainerService/Processes", in, out, c.cc, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -558,7 +547,7 @@ type ContainerServiceServer interface {
CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf.Empty, error) CloseStdin(context.Context, *CloseStdinRequest) (*google_protobuf.Empty, error)
Pause(context.Context, *PauseRequest) (*google_protobuf.Empty, error) Pause(context.Context, *PauseRequest) (*google_protobuf.Empty, error)
Resume(context.Context, *ResumeRequest) (*google_protobuf.Empty, error) Resume(context.Context, *ResumeRequest) (*google_protobuf.Empty, error)
Ps(context.Context, *PsRequest) (*PsResponse, error) Processes(context.Context, *ProcessesRequest) (*ProcessesResponse, error)
} }
func RegisterContainerServiceServer(s *grpc.Server, srv ContainerServiceServer) { func RegisterContainerServiceServer(s *grpc.Server, srv ContainerServiceServer) {
@ -784,20 +773,20 @@ func _ContainerService_Resume_Handler(srv interface{}, ctx context.Context, dec
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _ContainerService_Ps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _ContainerService_Processes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PsRequest) in := new(ProcessesRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(ContainerServiceServer).Ps(ctx, in) return srv.(ContainerServiceServer).Processes(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/containerd.v1.services.ContainerService/Ps", FullMethod: "/containerd.v1.services.ContainerService/Processes",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContainerServiceServer).Ps(ctx, req.(*PsRequest)) return srv.(ContainerServiceServer).Processes(ctx, req.(*ProcessesRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -851,8 +840,8 @@ var _ContainerService_serviceDesc = grpc.ServiceDesc{
Handler: _ContainerService_Resume_Handler, Handler: _ContainerService_Resume_Handler,
}, },
{ {
MethodName: "Ps", MethodName: "Processes",
Handler: _ContainerService_Ps_Handler, Handler: _ContainerService_Processes_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{ Streams: []grpc.StreamDesc{
@ -1405,7 +1394,7 @@ func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) {
return i, nil return i, nil
} }
func (m *PsRequest) Marshal() (dAtA []byte, err error) { func (m *ProcessesRequest) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA) n, err := m.MarshalTo(dAtA)
@ -1415,7 +1404,7 @@ func (m *PsRequest) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *PsRequest) MarshalTo(dAtA []byte) (int, error) { func (m *ProcessesRequest) MarshalTo(dAtA []byte) (int, error) {
var i int var i int
_ = i _ = i
var l int var l int
@ -1429,7 +1418,7 @@ func (m *PsRequest) MarshalTo(dAtA []byte) (int, error) {
return i, nil return i, nil
} }
func (m *Ps) Marshal() (dAtA []byte, err error) { func (m *ProcessesResponse) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA) n, err := m.MarshalTo(dAtA)
@ -1439,46 +1428,13 @@ func (m *Ps) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *Ps) MarshalTo(dAtA []byte) (int, error) { func (m *ProcessesResponse) MarshalTo(dAtA []byte) (int, error) {
var i int var i int
_ = i _ = i
var l int var l int
_ = l _ = l
if m.Pid != 0 { if len(m.Processes) > 0 {
dAtA[i] = 0x8 for _, msg := range m.Processes {
i++
i = encodeVarintExecution(dAtA, i, uint64(m.Pid))
}
if m.RuntimeData != nil {
dAtA[i] = 0x12
i++
i = encodeVarintExecution(dAtA, i, uint64(m.RuntimeData.Size()))
n5, err := m.RuntimeData.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n5
}
return i, nil
}
func (m *PsResponse) 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 *PsResponse) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Ps) > 0 {
for _, msg := range m.Ps {
dAtA[i] = 0xa dAtA[i] = 0xa
i++ i++
i = encodeVarintExecution(dAtA, i, uint64(msg.Size())) i = encodeVarintExecution(dAtA, i, uint64(msg.Size()))
@ -1758,7 +1714,7 @@ func (m *ResumeRequest) Size() (n int) {
return n return n
} }
func (m *PsRequest) Size() (n int) { func (m *ProcessesRequest) Size() (n int) {
var l int var l int
_ = l _ = l
l = len(m.ID) l = len(m.ID)
@ -1768,24 +1724,11 @@ func (m *PsRequest) Size() (n int) {
return n return n
} }
func (m *Ps) Size() (n int) { func (m *ProcessesResponse) Size() (n int) {
var l int var l int
_ = l _ = l
if m.Pid != 0 { if len(m.Processes) > 0 {
n += 1 + sovExecution(uint64(m.Pid)) for _, e := range m.Processes {
}
if m.RuntimeData != nil {
l = m.RuntimeData.Size()
n += 1 + l + sovExecution(uint64(l))
}
return n
}
func (m *PsResponse) Size() (n int) {
var l int
_ = l
if len(m.Ps) > 0 {
for _, e := range m.Ps {
l = e.Size() l = e.Size()
n += 1 + l + sovExecution(uint64(l)) n += 1 + l + sovExecution(uint64(l))
} }
@ -2005,33 +1948,22 @@ func (this *ResumeRequest) String() string {
}, "") }, "")
return s return s
} }
func (this *PsRequest) String() string { func (this *ProcessesRequest) String() string {
if this == nil { if this == nil {
return "nil" return "nil"
} }
s := strings.Join([]string{`&PsRequest{`, s := strings.Join([]string{`&ProcessesRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`, `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
} }
func (this *Ps) String() string { func (this *ProcessesResponse) String() string {
if this == nil { if this == nil {
return "nil" return "nil"
} }
s := strings.Join([]string{`&Ps{`, s := strings.Join([]string{`&ProcessesResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "Process", "containerd_v1_types1.Process", 1) + `,`,
`RuntimeData:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeData), "Any", "google_protobuf1.Any", 1) + `,`,
`}`,
}, "")
return s
}
func (this *PsResponse) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&PsResponse{`,
`Ps:` + strings.Replace(fmt.Sprintf("%v", this.Ps), "Ps", "Ps", 1) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -3786,7 +3718,7 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *PsRequest) Unmarshal(dAtA []byte) error { func (m *ProcessesRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -3809,10 +3741,10 @@ func (m *PsRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: PsRequest: wiretype end group for non-group") return fmt.Errorf("proto: ProcessesRequest: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: PsRequest: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: ProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
@ -3865,7 +3797,7 @@ func (m *PsRequest) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *Ps) Unmarshal(dAtA []byte) error { func (m *ProcessesResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -3888,34 +3820,15 @@ func (m *Ps) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: Ps: wiretype end group for non-group") return fmt.Errorf("proto: ProcessesResponse: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: Ps: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: ProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType)
}
m.Pid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowExecution
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Pid |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RuntimeData", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType)
} }
var msglen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
@ -3939,91 +3852,8 @@ func (m *Ps) Unmarshal(dAtA []byte) error {
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
if m.RuntimeData == nil { m.Processes = append(m.Processes, &containerd_v1_types1.Process{})
m.RuntimeData = &google_protobuf1.Any{} if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
}
if err := m.RuntimeData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
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 *PsResponse) 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: PsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Ps", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowExecution
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthExecution
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Ps = append(m.Ps, &Ps{})
if err := m.Ps[len(m.Ps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
@ -4158,64 +3988,64 @@ func init() {
} }
var fileDescriptorExecution = []byte{ var fileDescriptorExecution = []byte{
// 944 bytes of a gzipped FileDescriptorProto // 930 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x8e, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcf, 0x6f, 0xe3, 0x44,
0x10, 0x1e, 0x3b, 0x89, 0x37, 0x5b, 0x49, 0x96, 0xa5, 0x35, 0x1a, 0x19, 0x23, 0x25, 0xc1, 0xfb, 0x14, 0xae, 0xf3, 0xc3, 0x9b, 0xbe, 0x34, 0x4b, 0x77, 0x54, 0x55, 0xc6, 0xa0, 0x24, 0x32, 0xbb,
0x43, 0xe0, 0xe0, 0xc0, 0x70, 0x00, 0x21, 0x40, 0x9a, 0x9f, 0x68, 0x59, 0x0d, 0xcb, 0x06, 0x0f, 0x4b, 0x96, 0x83, 0x03, 0xe5, 0xb6, 0x02, 0xa4, 0xfe, 0x88, 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xf4, 0x23, 0x6c, 0x2f, 0x9d, 0x00, 0x0d, 0xb4, 0x9c, 0xd6, 0x8c, 0xc5,
0x1f, 0xfe, 0x86, 0xd0, 0x68, 0x0b, 0x9d, 0x08, 0x0d, 0xf9, 0xe0, 0x8e, 0xf5, 0x56, 0x05, 0xdc, 0x7e, 0x76, 0x07, 0xa4, 0x3c, 0x85, 0x23, 0xeb, 0xe6, 0x5d, 0x77, 0xeb, 0xef, 0x77, 0xdd, 0xad,
0xbb, 0x42, 0xe4, 0xc0, 0x0f, 0xed, 0xeb, 0xd7, 0xdd, 0x9d, 0x7f, 0x5e, 0x77, 0x77, 0x7e, 0x5d, 0x5f, 0x16, 0x5d, 0xe3, 0x66, 0xd1, 0x35, 0xfe, 0x5a, 0x74, 0x8d, 0x7f, 0x17, 0x5d, 0xe3, 0xc2,
0x76, 0x8d, 0xeb, 0x65, 0xd7, 0xf8, 0x7b, 0xd9, 0x35, 0xfe, 0x5b, 0x76, 0x8d, 0x33, 0x4b, 0x5c, 0xcc, 0xb8, 0x7c, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x76, 0x89, 0x1c, 0x40, 0x06, 0x0b,
0xfb, 0xd9, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x87, 0x9e, 0x96, 0x24, 0x0b, 0x00, 0x00, 0x00, 0x00,
} }

View File

@ -22,7 +22,7 @@ service ContainerService {
rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty); rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty);
rpc Pause(PauseRequest) returns (google.protobuf.Empty); rpc Pause(PauseRequest) returns (google.protobuf.Empty);
rpc Resume(ResumeRequest) returns (google.protobuf.Empty); rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
rpc Ps(PsRequest) returns (PsResponse); rpc Processes(ProcessesRequest) returns (ProcessesResponse);
} }
message CreateRequest { message CreateRequest {
@ -111,15 +111,10 @@ message ResumeRequest {
string id = 1 [(gogoproto.customname) = "ID"]; string id = 1 [(gogoproto.customname) = "ID"];
} }
message PsRequest { message ProcessesRequest {
string id = 1 [(gogoproto.customname) = "ID"]; string id = 1 [(gogoproto.customname) = "ID"];
} }
message Ps { message ProcessesResponse{
uint32 pid = 1; repeated containerd.v1.types.Process processes = 1;
google.protobuf.Any runtime_data = 2;
}
message PsResponse{
repeated Ps ps = 1;
} }

View File

@ -19,6 +19,7 @@ package container
import proto "github.com/gogo/protobuf/proto" import proto "github.com/gogo/protobuf/proto"
import fmt "fmt" import fmt "fmt"
import math "math" import math "math"
import google_protobuf "github.com/gogo/protobuf/types"
import _ "github.com/gogo/protobuf/gogoproto" import _ "github.com/gogo/protobuf/gogoproto"
import _ "github.com/gogo/protobuf/types" import _ "github.com/gogo/protobuf/types"
@ -125,6 +126,7 @@ type Process struct {
Terminal bool `protobuf:"varint,6,opt,name=terminal,proto3" json:"terminal,omitempty"` Terminal bool `protobuf:"varint,6,opt,name=terminal,proto3" json:"terminal,omitempty"`
ExitStatus uint32 `protobuf:"varint,7,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"` ExitStatus uint32 `protobuf:"varint,7,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
Status Status `protobuf:"varint,8,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"` Status Status `protobuf:"varint,8,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
RuntimeData *google_protobuf.Any `protobuf:"bytes,9,opt,name=runtime_data,json=runtimeData" json:"runtime_data,omitempty"`
} }
func (m *Process) Reset() { *m = Process{} } func (m *Process) Reset() { *m = Process{} }
@ -281,6 +283,16 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
i++ i++
i = encodeVarintContainer(dAtA, i, uint64(m.Status)) i = encodeVarintContainer(dAtA, i, uint64(m.Status))
} }
if m.RuntimeData != nil {
dAtA[i] = 0x4a
i++
i = encodeVarintContainer(dAtA, i, uint64(m.RuntimeData.Size()))
n2, err := m.RuntimeData.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
return i, nil return i, nil
} }
@ -310,21 +322,21 @@ func (m *User) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContainer(dAtA, i, uint64(m.Gid)) i = encodeVarintContainer(dAtA, i, uint64(m.Gid))
} }
if len(m.AdditionalGids) > 0 { if len(m.AdditionalGids) > 0 {
dAtA3 := make([]byte, len(m.AdditionalGids)*10) dAtA4 := make([]byte, len(m.AdditionalGids)*10)
var j2 int var j3 int
for _, num := range m.AdditionalGids { for _, num := range m.AdditionalGids {
for num >= 1<<7 { for num >= 1<<7 {
dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7 num >>= 7
j2++ j3++
} }
dAtA3[j2] = uint8(num) dAtA4[j3] = uint8(num)
j2++ j3++
} }
dAtA[i] = 0x1a dAtA[i] = 0x1a
i++ i++
i = encodeVarintContainer(dAtA, i, uint64(j2)) i = encodeVarintContainer(dAtA, i, uint64(j3))
i += copy(dAtA[i:], dAtA3[:j2]) i += copy(dAtA[i:], dAtA4[:j3])
} }
return i, nil return i, nil
} }
@ -368,11 +380,11 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x2a dAtA[i] = 0x2a
i++ i++
i = encodeVarintContainer(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt))) i = encodeVarintContainer(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:]) n5, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil { if err != nil {
return 0, err return 0, err
} }
i += n4 i += n5
return i, nil return i, nil
} }
@ -454,6 +466,10 @@ func (m *Process) Size() (n int) {
if m.Status != 0 { if m.Status != 0 {
n += 1 + sovContainer(uint64(m.Status)) n += 1 + sovContainer(uint64(m.Status))
} }
if m.RuntimeData != nil {
l = m.RuntimeData.Size()
n += 1 + l + sovContainer(uint64(l))
}
return n return n
} }
@ -535,6 +551,7 @@ func (this *Process) String() string {
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`, `Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
`Status:` + fmt.Sprintf("%v", this.Status) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
`RuntimeData:` + strings.Replace(fmt.Sprintf("%v", this.RuntimeData), "Any", "google_protobuf.Any", 1) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -560,7 +577,7 @@ func (this *Event) String() string {
`Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`, `Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`, `ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
`ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`, `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
`}`, `}`,
}, "") }, "")
return s return s
@ -916,6 +933,39 @@ func (m *Process) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RuntimeData", 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.RuntimeData == nil {
m.RuntimeData = &google_protobuf.Any{}
}
if err := m.RuntimeData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipContainer(dAtA[iNdEx:]) skippy, err := skipContainer(dAtA[iNdEx:])
@ -1363,41 +1413,44 @@ func init() {
} }
var fileDescriptorContainer = []byte{ var fileDescriptorContainer = []byte{
// 576 bytes of a gzipped FileDescriptorProto // 612 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x6e, 0xd3, 0x4e, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcd, 0x6e, 0xd3, 0x4c,
0x18, 0xcc, 0xda, 0xce, 0xbf, 0x2f, 0x6a, 0x7e, 0xd6, 0xfe, 0x10, 0x32, 0x41, 0x4a, 0xa2, 0x08, 0x14, 0xcd, 0xd8, 0xce, 0x8f, 0x6f, 0xbe, 0xe6, 0xb3, 0x86, 0x0a, 0xb9, 0x41, 0x4a, 0xa2, 0x08,
0x09, 0x0b, 0x09, 0x47, 0xa4, 0x17, 0xae, 0x6e, 0x6d, 0x95, 0x0a, 0xe1, 0x84, 0x8d, 0x23, 0x7a, 0x89, 0x08, 0x09, 0x47, 0xa4, 0x0b, 0xd8, 0xba, 0xb5, 0x55, 0x2a, 0x44, 0x12, 0x26, 0x8e, 0xe8,
0x8b, 0xdc, 0x78, 0x31, 0x8b, 0x1a, 0xdb, 0xb2, 0xd7, 0x85, 0xde, 0x78, 0x04, 0x9e, 0x81, 0xa7, 0x2e, 0x9a, 0xc6, 0xc6, 0x0c, 0x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0xb8, 0x87, 0x33, 0xdb, 0x71, 0x5c, 0xc7, 0xd0, 0x04, 0x6d, 0x6c, 0x4f, 0x27, 0xae, 0x63, 0x94,
0x99, 0xeb, 0xe8, 0xea, 0x2d, 0x27, 0xed, 0xc0, 0xb8, 0xbc, 0xee, 0xd7, 0xbe, 0x5d, 0xf7, 0x6b, 0x9f, 0xbe, 0x82, 0xca, 0x66, 0xbf, 0x3a, 0x54, 0xa7, 0xc3, 0xd7, 0xc3, 0xd1, 0xbb, 0xa1, 0x51,
0x9f, 0x36, 0x7d, 0x74, 0xb9, 0xe9, 0xa3, 0xaf, 0x9b, 0x3e, 0xfa, 0xb1, 0xe9, 0xa3, 0xd3, 0x86, 0x12, 0x45, 0xae, 0xe4, 0x18, 0x48, 0x14, 0x64, 0x3a, 0x1c, 0x1e, 0x0f, 0x8f, 0x0c, 0x45, 0x14,
0xac, 0xb7, 0xff, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xfb, 0xbb, 0xac, 0xdb, 0x03, 0x00, 0x00, 0x13, 0x6f, 0x34, 0x1e, 0xbb, 0x8e, 0xa1, 0xde, 0x50, 0xd2, 0x0e, 0xcc, 0x8b, 0xab, 0x56, 0xe9,
0xe7, 0x55, 0xab, 0xf4, 0x65, 0xdd, 0x42, 0x17, 0xeb, 0x16, 0xfa, 0xb1, 0x6e, 0xa1, 0xdf, 0xeb,
0x16, 0x3a, 0xad, 0x48, 0x7b, 0xfb, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x9b, 0x55, 0x0d,
0x2f, 0x04, 0x00, 0x00,
} }

View File

@ -2,6 +2,7 @@ syntax = "proto3";
package containerd.v1.types; package containerd.v1.types;
import "google/protobuf/any.proto";
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
@ -28,6 +29,7 @@ message Process {
bool terminal = 6; bool terminal = 6;
uint32 exit_status = 7; uint32 exit_status = 7;
Status status = 8; Status status = 8;
google.protobuf.Any runtime_data = 9;
} }
message User { message User {

View File

@ -26,7 +26,7 @@ var psCommand = cli.Command{
return errors.New("container id must be provided") return errors.New("container id must be provided")
} }
psRequest := &execution.PsRequest{ pr := &execution.ProcessesRequest{
ID: id, ID: id,
} }
@ -35,14 +35,14 @@ var psCommand = cli.Command{
return err return err
} }
resp, err := containers.Ps(gocontext.Background(), psRequest) resp, err := containers.Processes(gocontext.Background(), pr)
if err != nil { if err != nil {
return err return err
} }
w := tabwriter.NewWriter(os.Stdout, 10, 1, 3, ' ', 0) w := tabwriter.NewWriter(os.Stdout, 10, 1, 3, ' ', 0)
fmt.Fprintln(w, "PID") fmt.Fprintln(w, "PID")
for _, ps := range resp.Ps { for _, ps := range resp.Processes {
if _, err := fmt.Fprintf(w, "%d\n", if _, err := fmt.Fprintf(w, "%d\n",
ps.Pid, ps.Pid,
); err != nil { ); err != nil {

View File

@ -234,7 +234,7 @@ func (s *Service) Kill(ctx context.Context, r *api.KillRequest) (*google_protobu
return empty, nil return empty, nil
} }
func (s *Service) Ps(ctx context.Context, r *api.PsRequest) (*api.PsResponse, error) { func (s *Service) Processes(ctx context.Context, r *api.ProcessesRequest) (*api.ProcessesResponse, error) {
c, err := s.getContainer(r.ID) c, err := s.getContainer(r.ID)
if err != nil { if err != nil {
return nil, err return nil, err
@ -245,15 +245,15 @@ func (s *Service) Ps(ctx context.Context, r *api.PsRequest) (*api.PsResponse, er
return nil, err return nil, err
} }
ps := []*api.Ps{} ps := []*container.Process{}
for _, pid := range pids { for _, pid := range pids {
ps = append(ps, &api.Ps{ ps = append(ps, &container.Process{
Pid: pid, Pid: pid,
}) })
} }
resp := &api.PsResponse{ resp := &api.ProcessesResponse{
Ps: ps, Processes: ps,
} }
return resp, nil return resp, nil