k3s/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/name.go

34 lines
607 B
Go
Raw Normal View History

2019-01-12 04:58:27 +00:00
// +build linux
package fs
import (
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
)
type NameGroup struct {
GroupName string
Join bool
}
func (s *NameGroup) Name() string {
return s.GroupName
}
2020-08-10 17:43:49 +00:00
func (s *NameGroup) Apply(path string, d *cgroupData) error {
2019-01-12 04:58:27 +00:00
if s.Join {
// ignore errors if the named cgroup does not exist
_ = join(path, d.pid)
2019-01-12 04:58:27 +00:00
}
return nil
}
func (s *NameGroup) Set(_ string, _ *configs.Resources) error {
2019-01-12 04:58:27 +00:00
return nil
}
func (s *NameGroup) GetStats(path string, stats *cgroups.Stats) error {
return nil
}