summaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/containerd/cgroups/control.go
diff options
context:
space:
mode:
authorLantao Liu <lantaol@google.com>2019-05-10 18:27:49 -0700
committerIan Lewis <ianlewis@google.com>2019-05-11 10:27:49 +0900
commit97875daf63d03cda6ff3c4f393a004a8295a748e (patch)
tree30dce772c1d7bb9d77fab8b224675630e3c10b2d /vendor/github.com/containerd/cgroups/control.go
parent14f1de4a45daa75ef016fabb56d86cbd9b902504 (diff)
Port shim fix (#27)
Port shim fixes containerd/containerd#3264, containerd/containerd#3264 Update containerd to newest release/1.2 commit.
Diffstat (limited to 'vendor/github.com/containerd/cgroups/control.go')
-rw-r--r--vendor/github.com/containerd/cgroups/control.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/containerd/cgroups/control.go b/vendor/github.com/containerd/cgroups/control.go
index 63e2df93d..1f62c54f3 100644
--- a/vendor/github.com/containerd/cgroups/control.go
+++ b/vendor/github.com/containerd/cgroups/control.go
@@ -44,6 +44,15 @@ type Process struct {
Path string
}
+type Task struct {
+ // Subsystem is the name of the subsystem that the task is in
+ Subsystem Name
+ // Pid is the process id of the task
+ Pid int
+ // Path is the full path of the subsystem and location that the task is in
+ Path string
+}
+
// Cgroup handles interactions with the individual groups to perform
// actions on them as them main interface to this cgroup package
type Cgroup interface {
@@ -64,6 +73,8 @@ type Cgroup interface {
Update(resources *specs.LinuxResources) error
// Processes returns all the processes in a select subsystem for the cgroup
Processes(Name, bool) ([]Process, error)
+ // Tasks returns all the tasks in a select subsystem for the cgroup
+ Tasks(Name, bool) ([]Task, error)
// Freeze freezes or pauses all processes inside the cgroup
Freeze() error
// Thaw thaw or resumes all processes inside the cgroup