cgroup

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CgroupMemorySubsystem CgroupSubsystem = "memory"
	CgroupCpuSubsystem    CgroupSubsystem = "cpu"
	CgroupNetCLSSubsystem CgroupSubsystem = "net_cls"

	CgroupKubeRoot string = "kubepods"

	SystemdSuffix       string = ".slice"
	PodCgroupNamePrefix string = "pod"

	CPUQoSLevelFile string = "cpu.qos_level"
	CPUUsageFile    string = "cpuacct.usage"

	CPUQuotaBurstFile string = "cpu.cfs_burst_us"
	CPUQuotaTotalFile string = "cpu.cfs_quota_us"

	MemoryUsageFile    string = "memory.stat"
	MemoryQoSLevelFile string = "memory.qos_level"
	MemoryLimitFile    string = "memory.limit_in_bytes"

	NetCLSFileName string = "net_cls.classid"

	CPUShareFileName string = "cpu.shares"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CgroupManager

type CgroupManager interface {
	GetRootCgroupPath(cgroupSubsystem CgroupSubsystem) (string, error)
	GetQoSCgroupPath(qos corev1.PodQOSClass, cgroupSubsystem CgroupSubsystem) (string, error)
	GetPodCgroupPath(qos corev1.PodQOSClass, cgroupSubsystem CgroupSubsystem, podUID types.UID) (string, error)
}

func NewCgroupManager

func NewCgroupManager(cgroupDriver, cgroupRoot, kubeCgroupRoot string) CgroupManager

type CgroupManagerImpl

type CgroupManagerImpl struct {
	// contains filtered or unexported fields
}

func (*CgroupManagerImpl) CgroupNameToCgroupPath

func (c *CgroupManagerImpl) CgroupNameToCgroupPath(cgroupName []string) (string, error)

func (*CgroupManagerImpl) GetPodCgroupPath

func (c *CgroupManagerImpl) GetPodCgroupPath(qos corev1.PodQOSClass, cgroupSubsystem CgroupSubsystem, podUID types.UID) (string, error)

func (*CgroupManagerImpl) GetQoSCgroupPath

func (c *CgroupManagerImpl) GetQoSCgroupPath(qos corev1.PodQOSClass, cgroupSubsystem CgroupSubsystem) (string, error)

func (*CgroupManagerImpl) GetRootCgroupPath

func (c *CgroupManagerImpl) GetRootCgroupPath(cgroupSubsystem CgroupSubsystem) (string, error)

type CgroupName

type CgroupName []string

func (CgroupName) ToCgroupfs

func (cgroupName CgroupName) ToCgroupfs() (string, error)

func (CgroupName) ToSystemd

func (cgroupName CgroupName) ToSystemd() (string, error)

type CgroupSubsystem

type CgroupSubsystem string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL