Move systemd code into pkg

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-04-18 21:30:08 -07:00
parent a183681b1d
commit 9f508e4b3e
5 changed files with 46 additions and 50 deletions

View file

@ -24,16 +24,3 @@ type Cgroup struct {
type ActiveCgroup interface {
Cleanup() error
}
func Apply(c *Cgroup, pid int) (ActiveCgroup, error) {
// We have two implementation of cgroups support, one is based on
// systemd and the dbus api, and one is based on raw cgroup fs operations
// following the pre-single-writer model docs at:
// http://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups/
if useSystemd() {
return systemdApply(c, pid)
} else {
return rawApply(c, pid)
}
}