diff options
Diffstat (limited to 'vendor/github.com/containerd/cgroups/control.go')
-rw-r--r-- | vendor/github.com/containerd/cgroups/control.go | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/vendor/github.com/containerd/cgroups/control.go b/vendor/github.com/containerd/cgroups/control.go index 2de26732c..63e2df93d 100644 --- a/vendor/github.com/containerd/cgroups/control.go +++ b/vendor/github.com/containerd/cgroups/control.go @@ -1,3 +1,19 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + package cgroups import ( @@ -8,6 +24,7 @@ import ( const ( cgroupProcs = "cgroup.procs" + cgroupTasks = "tasks" defaultDirPerm = 0755 ) @@ -32,8 +49,10 @@ type Process struct { type Cgroup interface { // New creates a new cgroup under the calling cgroup New(string, *specs.LinuxResources) (Cgroup, error) - // Add adds a process to the cgroup + // Add adds a process to the cgroup (cgroup.procs) Add(Process) error + // AddTask adds a process to the cgroup (tasks) + AddTask(Process) error // Delete removes the cgroup as a whole Delete() error // MoveTo moves all the processes under the calling cgroup to the provided one |