Documentation ¶
Index ¶
Constants ¶
View Source
const ( GoodCgroupName = "good" BadCgroupName = "bad" )
View Source
const ( Root = "/sys/fs/cgroup" Garden = "garden" Header = "#subsys_name hierarchy num_cgroups enabled" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUCgrouper ¶
type CPUCgrouper struct {
// contains filtered or unexported fields
}
func NewCPUCgrouper ¶
func NewCPUCgrouper(cgroupRoot string) CPUCgrouper
func (CPUCgrouper) CreateBadCgroup ¶
func (c CPUCgrouper) CreateBadCgroup(handle string) error
func (CPUCgrouper) DestroyBadCgroup ¶
func (c CPUCgrouper) DestroyBadCgroup(handle string) error
func (CPUCgrouper) ReadBadCgroupUsage ¶
func (c CPUCgrouper) ReadBadCgroupUsage(handle string) (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 NoopCPUCgrouper ¶
type NoopCPUCgrouper struct{}
func (NoopCPUCgrouper) CreateBadCgroup ¶
func (NoopCPUCgrouper) CreateBadCgroup(string) error
func (NoopCPUCgrouper) DestroyBadCgroup ¶
func (NoopCPUCgrouper) DestroyBadCgroup(string) error
func (NoopCPUCgrouper) ReadBadCgroupUsage ¶
func (NoopCPUCgrouper) ReadBadCgroupUsage(string) (garden.ContainerCPUStat, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.