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 ApplyIOCostModelWithAbsolutePath(absCgroupPath string, devID string, data *common.IOCostModelData) error
- func ApplyIOCostModelWithRelativePath(relCgroupPath string, devID string, data *common.IOCostModelData) error
- func ApplyIOCostQoSWithAbsolutePath(absCgroupPath string, devID string, data *common.IOCostQoSData) error
- func ApplyIOCostQoSWithRelativePath(relCgroupPath string, devID string, data *common.IOCostQoSData) error
- func ApplyIOWeightWithAbsolutePath(absCgroupPath string, devID string, weight uint64) error
- func ApplyIOWeightWithRelativePath(relCgroupPath string, devID string, weight uint64) 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, nbytes int64) error
- func DropCacheWithTimeoutWithRelativePath(timeoutSecs int, absCgroupPath string, nbytes int64) 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 GetDeviceIOWeightWithAbsolutePath(absCgroupPath, devID string) (uint64, bool, error)
- func GetDeviceIOWeightWithRelativePath(relCgroupPath, devID string) (uint64, bool, error)
- func GetIOCostModelWithAbsolutePath(absCgroupPath string) (map[string]*common.IOCostModelData, error)
- func GetIOCostModelWithRelativePath(relCgroupPath string) (map[string]*common.IOCostModelData, error)
- func GetIOCostQoSWithAbsolutePath(absCgroupPath string) (map[string]*common.IOCostQoSData, error)
- func GetIOCostQoSWithRelativePath(relCgroupPath string) (map[string]*common.IOCostQoSData, error)
- func GetIOStatWithAbsolutePath(absCgroupPath string) (map[string]map[string]string, error)
- func GetIOStatWithRelativePath(relCgroupPath string) (map[string]map[string]string, 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 FakeCgroupManager
- func (f *FakeCgroupManager) ApplyCPU(absCgroupPath string, data *common.CPUData) error
- func (f *FakeCgroupManager) ApplyCPUSet(absCgroupPath string, data *common.CPUSetData) error
- func (f *FakeCgroupManager) ApplyIOCostModel(absCgroupPath string, devID string, data *common.IOCostModelData) error
- func (f *FakeCgroupManager) ApplyIOCostQoS(absCgroupPath string, devID string, data *common.IOCostQoSData) error
- func (f *FakeCgroupManager) ApplyIOWeight(absCgroupPath string, devID string, weight uint64) error
- func (f *FakeCgroupManager) ApplyMemory(absCgroupPath string, data *common.MemoryData) error
- func (f *FakeCgroupManager) ApplyNetCls(absCgroupPath string, data *common.NetClsData) error
- func (f *FakeCgroupManager) ApplyUnifiedData(absCgroupPath, cgroupFileName, data string) error
- func (f *FakeCgroupManager) GetCPU(absCgroupPath string) (*common.CPUStats, error)
- func (f *FakeCgroupManager) GetCPUSet(absCgroupPath string) (*common.CPUSetStats, error)
- func (f *FakeCgroupManager) GetDeviceIOWeight(absCgroupPath string, devID string) (uint64, bool, error)
- func (f *FakeCgroupManager) GetIOCostModel(absCgroupPath string) (map[string]*common.IOCostModelData, error)
- func (f *FakeCgroupManager) GetIOCostQoS(absCgroupPath string) (map[string]*common.IOCostQoSData, error)
- func (f *FakeCgroupManager) GetIOStat(absCgroupPath string) (map[string]map[string]string, error)
- func (f *FakeCgroupManager) GetMemory(absCgroupPath string) (*common.MemoryStats, error)
- func (f *FakeCgroupManager) GetMetrics(relCgroupPath string, subsystems map[string]struct{}) (*common.CgroupMetrics, error)
- func (f *FakeCgroupManager) GetPids(absCgroupPath string) ([]string, error)
- func (f *FakeCgroupManager) GetTasks(absCgroupPath 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 ApplyIOCostModelWithAbsolutePath ¶ added in v0.4.0
func ApplyIOCostModelWithAbsolutePath(absCgroupPath string, devID string, data *common.IOCostModelData) error
func ApplyIOCostModelWithRelativePath ¶ added in v0.4.0
func ApplyIOCostModelWithRelativePath(relCgroupPath string, devID string, data *common.IOCostModelData) error
func ApplyIOCostQoSWithAbsolutePath ¶ added in v0.4.0
func ApplyIOCostQoSWithAbsolutePath(absCgroupPath string, devID string, data *common.IOCostQoSData) error
func ApplyIOCostQoSWithRelativePath ¶ added in v0.4.0
func ApplyIOCostQoSWithRelativePath(relCgroupPath string, devID string, data *common.IOCostQoSData) error
func ApplyIOWeightWithAbsolutePath ¶ added in v0.4.0
func ApplyIOWeightWithRelativePath ¶ added in v0.4.0
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 GetDeviceIOWeightWithAbsolutePath ¶ added in v0.4.0
func GetDeviceIOWeightWithRelativePath ¶ added in v0.4.0
func GetIOCostModelWithAbsolutePath ¶ added in v0.4.0
func GetIOCostModelWithAbsolutePath(absCgroupPath string) (map[string]*common.IOCostModelData, error)
func GetIOCostModelWithRelativePath ¶ added in v0.4.0
func GetIOCostModelWithRelativePath(relCgroupPath string) (map[string]*common.IOCostModelData, error)
func GetIOCostQoSWithAbsolutePath ¶ added in v0.4.0
func GetIOCostQoSWithAbsolutePath(absCgroupPath string) (map[string]*common.IOCostQoSData, error)
func GetIOCostQoSWithRelativePath ¶ added in v0.4.0
func GetIOCostQoSWithRelativePath(relCgroupPath string) (map[string]*common.IOCostQoSData, error)
func GetIOStatWithAbsolutePath ¶ added in v0.4.0
func GetIOStatWithRelativePath ¶ added in v0.4.0
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 FakeCgroupManager ¶ added in v0.4.0
type FakeCgroupManager struct{}
func (*FakeCgroupManager) ApplyCPU ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyCPU(absCgroupPath string, data *common.CPUData) error
func (*FakeCgroupManager) ApplyCPUSet ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyCPUSet(absCgroupPath string, data *common.CPUSetData) error
func (*FakeCgroupManager) ApplyIOCostModel ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyIOCostModel(absCgroupPath string, devID string, data *common.IOCostModelData) error
func (*FakeCgroupManager) ApplyIOCostQoS ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyIOCostQoS(absCgroupPath string, devID string, data *common.IOCostQoSData) error
func (*FakeCgroupManager) ApplyIOWeight ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyIOWeight(absCgroupPath string, devID string, weight uint64) error
func (*FakeCgroupManager) ApplyMemory ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyMemory(absCgroupPath string, data *common.MemoryData) error
func (*FakeCgroupManager) ApplyNetCls ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyNetCls(absCgroupPath string, data *common.NetClsData) error
func (*FakeCgroupManager) ApplyUnifiedData ¶ added in v0.4.0
func (f *FakeCgroupManager) ApplyUnifiedData(absCgroupPath, cgroupFileName, data string) error
func (*FakeCgroupManager) GetCPU ¶ added in v0.4.0
func (f *FakeCgroupManager) GetCPU(absCgroupPath string) (*common.CPUStats, error)
func (*FakeCgroupManager) GetCPUSet ¶ added in v0.4.0
func (f *FakeCgroupManager) GetCPUSet(absCgroupPath string) (*common.CPUSetStats, error)
func (*FakeCgroupManager) GetDeviceIOWeight ¶ added in v0.4.0
func (*FakeCgroupManager) GetIOCostModel ¶ added in v0.4.0
func (f *FakeCgroupManager) GetIOCostModel(absCgroupPath string) (map[string]*common.IOCostModelData, error)
func (*FakeCgroupManager) GetIOCostQoS ¶ added in v0.4.0
func (f *FakeCgroupManager) GetIOCostQoS(absCgroupPath string) (map[string]*common.IOCostQoSData, error)
func (*FakeCgroupManager) GetMemory ¶ added in v0.4.0
func (f *FakeCgroupManager) GetMemory(absCgroupPath string) (*common.MemoryStats, error)
func (*FakeCgroupManager) GetMetrics ¶ added in v0.4.0
func (f *FakeCgroupManager) GetMetrics(relCgroupPath string, subsystems map[string]struct{}) (*common.CgroupMetrics, error)
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 ApplyIOCostQoS(absCgroupPath string, devID string, data *common.IOCostQoSData) error ApplyIOCostModel(absCgroupPath string, devID string, data *common.IOCostModelData) error ApplyIOWeight(absCgroupPath string, devID string, weight uint64) 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) GetIOCostQoS(absCgroupPath string) (map[string]*common.IOCostQoSData, error) GetIOCostModel(absCgroupPath string) (map[string]*common.IOCostModelData, error) GetDeviceIOWeight(absCgroupPath string, devID string) (uint64, bool, error) GetIOStat(absCgroupPath string) (map[string]map[string]string, 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.