Documentation ¶
Index ¶
Constants ¶
View Source
const ( GoodCgroupName = "good" BadCgroupName = "bad" InitCgroupName = "init" Unified = "unified" )
View Source
const ( Root = "/sys/fs/cgroup" Garden = "garden" Header = "#subsys_name hierarchy num_cgroups enabled" )
Variables ¶
This section is empty.
Functions ¶
func IsCgroup2UnifiedMode ¶
func IsCgroup2UnifiedMode() bool
Types ¶
type CPUCgrouper ¶
type CPUCgrouper struct {
// contains filtered or unexported fields
}
func NewCPUCgrouper ¶
func NewCPUCgrouper(cgroupRoot string) CPUCgrouper
func (CPUCgrouper) CleanupCgroups ¶
func (c CPUCgrouper) CleanupCgroups(handle string) error
func (CPUCgrouper) PrepareCgroups ¶
func (c CPUCgrouper) PrepareCgroups(handle string) error
func (CPUCgrouper) ReadTotalCgroupUsage ¶
func (c CPUCgrouper) ReadTotalCgroupUsage(handle string, containerCPUStats garden.ContainerCPUStat) (garden.ContainerCPUStat, error)
type CgroupStarter ¶
type CgroupStarter struct { CgroupPath string GardenCgroup string AllowedDevices []specs.LinuxDeviceCgroup ProcCgroups io.ReadCloser ProcSelfCgroups io.ReadCloser CPUThrottling bool Logger lager.Logger MountPointChecker rundmc.MountPointChecker FS fs.FS // contains filtered or unexported fields }
func NewStarter ¶
func NewStarter( logger lager.Logger, procCgroupReader io.ReadCloser, procSelfCgroupReader io.ReadCloser, cgroupMountpoint string, gardenCgroup string, allowedDevices []specs.LinuxDeviceCgroup, mountPointChecker rundmc.MountPointChecker, enableCPUThrottling bool, ) *CgroupStarter
func (*CgroupStarter) Start ¶
func (s *CgroupStarter) Start() error
func (*CgroupStarter) WithGID ¶
func (s *CgroupStarter) WithGID(gid int) *CgroupStarter
func (*CgroupStarter) WithUID ¶
func (s *CgroupStarter) WithUID(uid int) *CgroupStarter
type CgroupsFormatError ¶
type CgroupsFormatError struct {
Content string
}
func (CgroupsFormatError) Error ¶
func (err CgroupsFormatError) Error() string
type DefaultCgrouper ¶
type DefaultCgrouper struct {
// contains filtered or unexported fields
}
func NewDefaultCgrouper ¶
func NewDefaultCgrouper(cgroupRoot string) DefaultCgrouper
func (DefaultCgrouper) CleanupCgroups ¶
func (c DefaultCgrouper) CleanupCgroups(handle string) error
func (DefaultCgrouper) PrepareCgroups ¶
func (c DefaultCgrouper) PrepareCgroups(handle string) error
func (DefaultCgrouper) ReadTotalCgroupUsage ¶
func (DefaultCgrouper) ReadTotalCgroupUsage(_ string, cpuStats garden.ContainerCPUStat) (garden.ContainerCPUStat, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.