shim: Ps -> Processes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2017-05-17 12:58:03 -04:00
parent 395d21018f
commit 70dd7fcc60
9 changed files with 132 additions and 309 deletions

View File

@ -26,9 +26,8 @@
ExitRequest ExitRequest
KillRequest KillRequest
CloseStdinRequest CloseStdinRequest
PsRequest ProcessesRequest
Ps ProcessesResponse
PsResponse
*/ */
package shim package shim
@ -221,30 +220,21 @@ func (m *CloseStdinRequest) Reset() { *m = CloseStdinRequest{
func (*CloseStdinRequest) ProtoMessage() {} func (*CloseStdinRequest) ProtoMessage() {}
func (*CloseStdinRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} } func (*CloseStdinRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} }
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 fileDescriptorShim, []int{17} } func (*ProcessesRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{17} }
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_protobuf.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 fileDescriptorShim, []int{18} } func (*ProcessesResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{18} }
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 fileDescriptorShim, []int{19} }
func init() { func init() {
proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.shim.CreateRequest") proto.RegisterType((*CreateRequest)(nil), "containerd.v1.services.shim.CreateRequest")
@ -264,9 +254,8 @@ func init() {
proto.RegisterType((*ExitRequest)(nil), "containerd.v1.services.shim.ExitRequest") proto.RegisterType((*ExitRequest)(nil), "containerd.v1.services.shim.ExitRequest")
proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.shim.KillRequest") proto.RegisterType((*KillRequest)(nil), "containerd.v1.services.shim.KillRequest")
proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.shim.CloseStdinRequest") proto.RegisterType((*CloseStdinRequest)(nil), "containerd.v1.services.shim.CloseStdinRequest")
proto.RegisterType((*PsRequest)(nil), "containerd.v1.services.shim.PsRequest") proto.RegisterType((*ProcessesRequest)(nil), "containerd.v1.services.shim.ProcessesRequest")
proto.RegisterType((*Ps)(nil), "containerd.v1.services.shim.Ps") proto.RegisterType((*ProcessesResponse)(nil), "containerd.v1.services.shim.ProcessesResponse")
proto.RegisterType((*PsResponse)(nil), "containerd.v1.services.shim.PsResponse")
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -284,7 +273,7 @@ type ShimClient interface {
Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error) State(ctx context.Context, in *StateRequest, opts ...grpc.CallOption) (*StateResponse, error)
Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error)
Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Pause(ctx context.Context, in *PauseRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Resume(ctx context.Context, in *ResumeRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) Exit(ctx context.Context, in *ExitRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
@ -339,9 +328,9 @@ func (c *shimClient) State(ctx context.Context, in *StateRequest, opts ...grpc.C
return out, nil return out, nil
} }
func (c *shimClient) Ps(ctx context.Context, in *PsRequest, opts ...grpc.CallOption) (*PsResponse, error) { func (c *shimClient) Processes(ctx context.Context, in *ProcessesRequest, opts ...grpc.CallOption) (*ProcessesResponse, error) {
out := new(PsResponse) out := new(ProcessesResponse)
err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Ps", in, out, c.cc, opts...) err := grpc.Invoke(ctx, "/containerd.v1.services.shim.Shim/Processes", in, out, c.cc, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -450,7 +439,7 @@ type ShimServer interface {
Start(context.Context, *StartRequest) (*google_protobuf1.Empty, error) Start(context.Context, *StartRequest) (*google_protobuf1.Empty, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
State(context.Context, *StateRequest) (*StateResponse, error) State(context.Context, *StateRequest) (*StateResponse, error)
Ps(context.Context, *PsRequest) (*PsResponse, error) Processes(context.Context, *ProcessesRequest) (*ProcessesResponse, error)
Pause(context.Context, *PauseRequest) (*google_protobuf1.Empty, error) Pause(context.Context, *PauseRequest) (*google_protobuf1.Empty, error)
Resume(context.Context, *ResumeRequest) (*google_protobuf1.Empty, error) Resume(context.Context, *ResumeRequest) (*google_protobuf1.Empty, error)
Exit(context.Context, *ExitRequest) (*google_protobuf1.Empty, error) Exit(context.Context, *ExitRequest) (*google_protobuf1.Empty, error)
@ -537,20 +526,20 @@ func _Shim_State_Handler(srv interface{}, ctx context.Context, dec func(interfac
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Shim_Ps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Shim_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.(ShimServer).Ps(ctx, in) return srv.(ShimServer).Processes(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/containerd.v1.services.shim.Shim/Ps", FullMethod: "/containerd.v1.services.shim.Shim/Processes",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ShimServer).Ps(ctx, req.(*PsRequest)) return srv.(ShimServer).Processes(ctx, req.(*ProcessesRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
@ -723,8 +712,8 @@ var _Shim_serviceDesc = grpc.ServiceDesc{
Handler: _Shim_State_Handler, Handler: _Shim_State_Handler,
}, },
{ {
MethodName: "Ps", MethodName: "Processes",
Handler: _Shim_Ps_Handler, Handler: _Shim_Processes_Handler,
}, },
{ {
MethodName: "Pause", MethodName: "Pause",
@ -1295,7 +1284,7 @@ func (m *CloseStdinRequest) 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)
@ -1305,7 +1294,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
@ -1319,7 +1308,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)
@ -1329,46 +1318,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 = encodeVarintShim(dAtA, i, uint64(m.Pid))
}
if m.RuntimeData != nil {
dAtA[i] = 0x12
i++
i = encodeVarintShim(dAtA, i, uint64(m.RuntimeData.Size()))
n3, err := m.RuntimeData.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
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 = encodeVarintShim(dAtA, i, uint64(msg.Size())) i = encodeVarintShim(dAtA, i, uint64(msg.Size()))
@ -1631,7 +1587,7 @@ func (m *CloseStdinRequest) 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)
@ -1641,24 +1597,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 + sovShim(uint64(m.Pid)) for _, e := range m.Processes {
}
if m.RuntimeData != nil {
l = m.RuntimeData.Size()
n += 1 + l + sovShim(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 + sovShim(uint64(l)) n += 1 + l + sovShim(uint64(l))
} }
@ -1866,33 +1809,22 @@ func (this *CloseStdinRequest) 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_protobuf.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
@ -3574,7 +3506,7 @@ func (m *CloseStdinRequest) 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 {
@ -3597,10 +3529,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:
@ -3653,7 +3585,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 {
@ -3676,34 +3608,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 ErrIntOverflowShim
}
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 {
@ -3727,91 +3640,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_protobuf.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 := skipShim(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthShim
}
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 ErrIntOverflowShim
}
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 ErrIntOverflowShim
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthShim
}
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
@ -3946,67 +3776,65 @@ func init() {
} }
var fileDescriptorShim = []byte{ var fileDescriptorShim = []byte{
// 983 bytes of a gzipped FileDescriptorProto // 951 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6f, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcf, 0x6f, 0xe3, 0x44,
0x14, 0xaf, 0x93, 0xd4, 0x4d, 0x5f, 0xea, 0x2e, 0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, 0x21, 0x5f, 0xfe, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x26,
0x3a, 0x1b, 0xff, 0xbc, 0xe9, 0x6c, 0xfc, 0x3a, 0xed, 0x58, 0x37, 0xd3, 0x8e, 0xf5, 0xf7, 0xb4, 0xfb, 0xd6, 0x0f, 0x06, 0x0b, 0x00, 0x00,
0x63, 0xfd, 0x37, 0xed, 0x58, 0x97, 0xb6, 0x42, 0x3e, 0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x7a,
0x10, 0xcb, 0x24, 0x29, 0x0b, 0x00, 0x00,
} }

View File

@ -18,7 +18,7 @@ service Shim {
rpc Start(StartRequest) returns (google.protobuf.Empty); rpc Start(StartRequest) returns (google.protobuf.Empty);
rpc Delete(DeleteRequest) returns (DeleteResponse); rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc State(StateRequest) returns (StateResponse); rpc State(StateRequest) returns (StateResponse);
rpc Ps(PsRequest) returns (PsResponse); rpc Processes(ProcessesRequest) returns (ProcessesResponse);
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);
@ -115,15 +115,10 @@ message CloseStdinRequest {
uint32 pid = 1; uint32 pid = 1;
} }
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

@ -48,10 +48,10 @@ var psCommand = cli.Command{
); err != nil { ); err != nil {
return err return err
} }
}
if err := w.Flush(); err != nil { if err := w.Flush(); err != nil {
return err return err
} }
}
return nil return nil
}, },

View File

@ -114,8 +114,8 @@ func (c *Container) Exec(ctx context.Context, opts plugin.ExecOpts) (plugin.Proc
}, nil }, nil
} }
func (c *Container) Ps(ctx context.Context) ([]uint32, error) { func (c *Container) Processes(ctx context.Context) ([]uint32, error) {
resp, err := c.shim.Ps(ctx, &shim.PsRequest{ resp, err := c.shim.Processes(ctx, &shim.ProcessesRequest{
ID: c.id, ID: c.id,
}) })
@ -123,9 +123,9 @@ func (c *Container) Ps(ctx context.Context) ([]uint32, error) {
return nil, err return nil, err
} }
pids := make([]uint32, 0, len(resp.Ps)) pids := make([]uint32, 0, len(resp.Processes))
for _, ps := range resp.Ps { for _, ps := range resp.Processes {
pids = append(pids, ps.Pid) pids = append(pids, ps.Pid)
} }

View File

@ -82,8 +82,8 @@ func (c *client) Kill(ctx context.Context, in *shimapi.KillRequest, opts ...grpc
return c.s.Kill(ctx, in) return c.s.Kill(ctx, in)
} }
func (c *client) Ps(ctx context.Context, in *shimapi.PsRequest, opts ...grpc.CallOption) (*shimapi.PsResponse, error) { func (c *client) Processes(ctx context.Context, in *shimapi.ProcessesRequest, opts ...grpc.CallOption) (*shimapi.ProcessesResponse, error) {
return c.s.Ps(ctx, in) return c.s.Processes(ctx, in)
} }
func (c *client) Exit(ctx context.Context, in *shimapi.ExitRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { func (c *client) Exit(ctx context.Context, in *shimapi.ExitRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {

View File

@ -250,20 +250,20 @@ func (s *Service) Kill(ctx context.Context, r *shimapi.KillRequest) (*google_pro
return empty, nil return empty, nil
} }
func (s *Service) Ps(ctx context.Context, r *shimapi.PsRequest) (*shimapi.PsResponse, error) { func (s *Service) Processes(ctx context.Context, r *shimapi.ProcessesRequest) (*shimapi.ProcessesResponse, error) {
pids, err := s.getContainerPids(ctx, r.ID) pids, err := s.getContainerPids(ctx, r.ID)
if err != nil { if err != nil {
return nil, err return nil, err
} }
ps := []*shimapi.Ps{} ps := []*container.Process{}
for _, pid := range pids { for _, pid := range pids {
ps = append(ps, &shimapi.Ps{ ps = append(ps, &container.Process{
Pid: pid, Pid: pid,
}) })
} }
resp := &shimapi.PsResponse{ resp := &shimapi.ProcessesResponse{
Ps: ps, Processes: ps,
} }
return resp, nil return resp, nil

View File

@ -22,8 +22,8 @@ type Container interface {
Kill(context.Context, uint32, uint32, bool) error Kill(context.Context, uint32, uint32, bool) error
// Exec adds a process into the container // Exec adds a process into the container
Exec(context.Context, ExecOpts) (Process, error) Exec(context.Context, ExecOpts) (Process, error)
// Ps returns all pids for the container // Processes returns all pids for the container
Ps(context.Context) ([]uint32, error) Processes(context.Context) ([]uint32, error)
// Pty resizes the processes pty/console // Pty resizes the processes pty/console
Pty(context.Context, uint32, ConsoleSize) error Pty(context.Context, uint32, ConsoleSize) error
// CloseStdin closes the processes stdin // CloseStdin closes the processes stdin

View File

@ -240,7 +240,7 @@ func (s *Service) Processes(ctx context.Context, r *api.ProcessesRequest) (*api.
return nil, err return nil, err
} }
pids, err := c.Ps(ctx) pids, err := c.Processes(ctx)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -174,7 +174,7 @@ func (c *container) Pid() uint32 {
return c.ctr.Pid() return c.ctr.Pid()
} }
func (c *container) Ps(ctx context.Context) ([]uint32, error) { func (c *container) Processes(ctx context.Context) ([]uint32, error) {
// TODO (ehazlett): support finding all processes in windows container // TODO (ehazlett): support finding all processes in windows container
p, err := c.ctr.ProcessList() p, err := c.ctr.ProcessList()
if err != nil { if err != nil {