Change ListProcesses to ListPids
These rpcs only return pids []uint32 so should be named that way in order to have other rpcs that list Processes such as Exec'd processes. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
8
task.go
8
task.go
@@ -213,17 +213,13 @@ 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().ListProcesses(ctx, &tasks.ListProcessesRequest{
|
||||
response, err := t.client.TaskService().ListPids(ctx, &tasks.ListPidsRequest{
|
||||
ContainerID: t.containerID,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var out []uint32
|
||||
for _, p := range response.Processes {
|
||||
out = append(out, p.Pid)
|
||||
}
|
||||
return out, nil
|
||||
return response.Pids, nil
|
||||
}
|
||||
|
||||
func (t *task) CloseIO(ctx context.Context, opts ...IOCloserOpts) error {
|
||||
|
Reference in New Issue
Block a user