Fast path getting pid from task

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2019-07-26 17:48:00 +00:00
parent ab78270e03
commit eb4b3e8772
4 changed files with 19 additions and 7 deletions

View File

@@ -33,6 +33,7 @@ type TaskInfo struct {
// Process is a runtime object for an executing process inside a container
type Process interface {
// ID of the process
ID() string
// State returns the process state
State(context.Context) (State, error)
@@ -54,6 +55,8 @@ type Process interface {
type Task interface {
Process
// PID of the process
PID() uint32
// Namespace that the task exists in
Namespace() string
// Pause pauses the container process