func PidPath(pid int) cgroups.Path
func V1() ([]cgroups.Subsystem, error)
func V2PidGroupPath(pid int) (string, error)
type AttachCGroup interface { TargetCGroup() CGroupInfo AttachProcess(pid int) error }
func GetAttacherForPID(targetPID int) (AttachCGroup, error)
GetAttacherForPID return a AttachCGroup, which could attach a process to the same cgroup of the target pid
type AttachCGroupV1 struct {
// contains filtered or unexported fields
}
func (a *AttachCGroupV1) AttachProcess(pid int) error
func (a *AttachCGroupV1) TargetCGroup() CGroupInfo
type AttachCGroupV2 struct {
// contains filtered or unexported fields
}
func (a *AttachCGroupV2) AttachProcess(pid int) error
func (a *AttachCGroupV2) TargetCGroup() CGroupInfo
type CGroupInfo struct { CGMode cgroups.CGMode V1Path cgroups.Path V2CGroupPath string }