libct/cgroups/systemd/v1: add NewLegacyManager

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2020-05-07 19:36:47 -07:00
parent fc620fdf81
commit d827e323b0
2 changed files with 8 additions and 4 deletions
+7
View File
@@ -23,6 +23,13 @@ type LegacyManager struct {
Paths map[string]string
}
func NewLegacyManager(cg *configs.Cgroup, paths map[string]string) cgroups.Manager {
return &LegacyManager{
Cgroups: cg,
Paths: paths,
}
}
type subsystem interface {
// Name returns the name of the subsystem.
Name() string
+1 -4
View File
@@ -88,10 +88,7 @@ func SystemdCgroups(l *LinuxFactory) error {
}
l.NewCgroupsManager = func(config *configs.Cgroup, paths map[string]string) cgroups.Manager {
return &systemd.LegacyManager{
Cgroups: config,
Paths: paths,
}
return systemd.NewLegacyManager(config, paths)
}
return nil