Documentation ¶
Index ¶
- func GetCgroupPathTypeDocker(containerId string) (string, error)
- func GetCgroupPathTypeSystem(containerId string) (string, error)
- type ControllerCgroup
- func (c *ControllerCgroup) GetCgroupPath(containerId string) (string, error)
- func (c *ControllerCgroup) UpdateCpuResources(cgroupPath string, ratio float64) error
- func (c *ControllerCgroup) UpdateCpuSets(cgroupPath, cpuSet string) error
- func (c *ControllerCgroup) UpdateCpuShares(cgroupPaths []string, ratio []int) error
- func (c *ControllerCgroup) UpdateMemResources() error
- func (c *ControllerCgroup) UpdateNetResources(cgroupPath string) error
- type GetContainerCgroupPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCgroupPathTypeDocker ¶
func GetCgroupPathTypeSystem ¶
cgroupPath 指 subsystems 的相对路径,如/sys/fs/cgroup/cpu/ 目录下的相对路径 /test 在Ubuntu中,对于容器而言,相对路径即 /docker/{containerID<no-trunc>}
Types ¶
type ControllerCgroup ¶
type ControllerCgroup struct {
// contains filtered or unexported fields
}
func NewControllerCgroup ¶
func NewControllerCgroup(context context.Context, pathType string) (*ControllerCgroup, error)
func (*ControllerCgroup) GetCgroupPath ¶
func (c *ControllerCgroup) GetCgroupPath(containerId string) (string, error)
func (*ControllerCgroup) UpdateCpuResources ¶
func (c *ControllerCgroup) UpdateCpuResources(cgroupPath string, ratio float64) error
func (*ControllerCgroup) UpdateCpuSets ¶
func (c *ControllerCgroup) UpdateCpuSets(cgroupPath, cpuSet string) error
func (*ControllerCgroup) UpdateCpuShares ¶
func (c *ControllerCgroup) UpdateCpuShares(cgroupPaths []string, ratio []int) error
func (*ControllerCgroup) UpdateMemResources ¶
func (c *ControllerCgroup) UpdateMemResources() error
todo control memory resources
func (*ControllerCgroup) UpdateNetResources ¶
func (c *ControllerCgroup) UpdateNetResources(cgroupPath string) error
使用 classId 区分数据包
type GetContainerCgroupPath ¶
Click to show internal directories.
Click to hide internal directories.