Documentation
¶
Index ¶
- func ApplyCPUSetForContainer(podUID, containerId string, data *common.CPUSetData) error
- func ApplyCPUSetWithAbsolutePath(absCgroupPath string, data *common.CPUSetData) error
- func ApplyCPUSetWithRelativePath(relCgroupPath string, data *common.CPUSetData) error
- func ApplyCPUWithRelativePath(relCgroupPath string, data *common.CPUData) error
- func ApplyMemoryWithRelativePath(relCgroupPath string, data *common.MemoryData) error
- func ApplyNetClsForContainer(podUID, containerId string, data *common.NetClsData) error
- func ApplyNetClsWithAbsolutePath(absCgroupPath string, data *common.NetClsData) error
- func ApplyNetClsWithRelativePath(relCgroupPath string, data *common.NetClsData) error
- func ApplyUnifiedDataForContainer(podUID, containerId, subsys, cgroupFileName, data string) error
- func ApplyUnifiedDataWithAbsolutePath(absCgroupPath, cgroupFileName, data string) error
- func DropCacheWithTimeoutForContainer(ctx context.Context, podUID, containerId string, timeoutSecs int) error
- func DropCacheWithTimeoutWithRelativePath(timeoutSecs int, absCgroupPath string) error
- func GetCPUSetForContainer(podUID, containerId string) (*common.CPUSetStats, error)
- func GetCPUSetWithAbsolutePath(absCgroupPath string) (*common.CPUSetStats, error)
- func GetCPUSetWithRelativePath(relCgroupPath string) (*common.CPUSetStats, error)
- func GetCPUWithRelativePath(relCgroupPath string) (*common.CPUStats, error)
- func GetMemoryWithAbsolutePath(absCgroupPath string) (*common.MemoryStats, error)
- func GetMemoryWithRelativePath(relCgroupPath string) (*common.MemoryStats, error)
- func GetMetricsWithRelativePath(relCgroupPath string, subsystems map[string]struct{}) (*common.CgroupMetrics, error)
- func GetPidsWithAbsolutePath(absCgroupPath string) ([]string, error)
- func GetPidsWithRelativePath(relCgroupPath string) ([]string, error)
- func GetTasksWithAbsolutePath(absCgroupPath string) ([]string, error)
- func GetTasksWithRelativePath(cgroupPath, subsys string) ([]string, error)
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCPUSetForContainer ¶
func ApplyCPUSetForContainer(podUID, containerId string, data *common.CPUSetData) error
func ApplyCPUSetWithAbsolutePath ¶
func ApplyCPUSetWithAbsolutePath(absCgroupPath string, data *common.CPUSetData) error
func ApplyCPUSetWithRelativePath ¶
func ApplyCPUSetWithRelativePath(relCgroupPath string, data *common.CPUSetData) error
func ApplyMemoryWithRelativePath ¶
func ApplyMemoryWithRelativePath(relCgroupPath string, data *common.MemoryData) error
func ApplyNetClsForContainer ¶ added in v0.2.0
func ApplyNetClsForContainer(podUID, containerId string, data *common.NetClsData) error
ApplyNetClsForContainer applies the net_cls config for a container.
func ApplyNetClsWithAbsolutePath ¶ added in v0.2.0
func ApplyNetClsWithAbsolutePath(absCgroupPath string, data *common.NetClsData) error
func ApplyNetClsWithRelativePath ¶
func ApplyNetClsWithRelativePath(relCgroupPath string, data *common.NetClsData) error
func ApplyUnifiedDataForContainer ¶ added in v0.3.0
ApplyUnifiedDataForContainer applies the data to cgroupFileName in subsys for a container.
func ApplyUnifiedDataWithAbsolutePath ¶ added in v0.3.0
func GetCPUSetForContainer ¶
func GetCPUSetForContainer(podUID, containerId string) (*common.CPUSetStats, error)
func GetCPUSetWithAbsolutePath ¶
func GetCPUSetWithAbsolutePath(absCgroupPath string) (*common.CPUSetStats, error)
func GetCPUSetWithRelativePath ¶
func GetCPUSetWithRelativePath(relCgroupPath string) (*common.CPUSetStats, error)
func GetCPUWithRelativePath ¶
func GetMemoryWithAbsolutePath ¶
func GetMemoryWithAbsolutePath(absCgroupPath string) (*common.MemoryStats, error)
func GetMemoryWithRelativePath ¶
func GetMemoryWithRelativePath(relCgroupPath string) (*common.MemoryStats, error)
func GetMetricsWithRelativePath ¶
func GetMetricsWithRelativePath(relCgroupPath string, subsystems map[string]struct{}) (*common.CgroupMetrics, error)
func GetPidsWithAbsolutePath ¶
func GetPidsWithRelativePath ¶
Types ¶
type Manager ¶
type Manager interface { ApplyMemory(absCgroupPath string, data *common.MemoryData) error ApplyCPU(absCgroupPath string, data *common.CPUData) error ApplyCPUSet(absCgroupPath string, data *common.CPUSetData) error ApplyNetCls(absCgroupPath string, data *common.NetClsData) error ApplyUnifiedData(absCgroupPath, cgroupFileName, data string) error GetMemory(absCgroupPath string) (*common.MemoryStats, error) GetCPU(absCgroupPath string) (*common.CPUStats, error) GetCPUSet(absCgroupPath string) (*common.CPUSetStats, error) GetMetrics(relCgroupPath string, subsystems map[string]struct{}) (*common.CgroupMetrics, error) GetPids(absCgroupPath string) ([]string, error) GetTasks(absCgroupPath string) ([]string, error) }
Manager cgroup operation interface for different sub-systems. if v1 and v2 versioned cgroup system will perform different actions, it should be organized in manager; otherwise, implement in general util file instead.
func GetManager ¶
func GetManager() Manager
GetManager returns a cgroup instance for both v1/v2 version
Click to show internal directories.
Click to hide internal directories.