Documentation ¶
Index ¶
- Constants
- func CheckExistAndKillByKey(ctx context.Context, processKey string) error
- func CheckExistAndSignalByKey(ctx context.Context, processKey string, signal int) error
- func ExistPid(ctx context.Context, pid int) (bool, error)
- func ExistProcessByKey(ctx context.Context, key string) (bool, error)
- func GetPidByKeyWithoutRunUser(ctx context.Context, key string) (int, error)
- func GetPidListByKey(ctx context.Context, cr, cId string, key string) ([]int, error)
- func GetPidListByListStrAndKey(ctx context.Context, cr, cId string, pidListStr, key string) (pidList []int, err error)
- func GetPidListByPidOrKeyInContainer(ctx context.Context, cr, cId string, pid int, key string) ([]int, error)
- func GetPidListByStr(ctx context.Context, pidStr string) ([]int, error)
- func GetProcessByKey(ctx context.Context, cr, cId string, key string) ([]int, error)
- func GetProcessByPid(ctx context.Context, cr, cId string, pid int) (int, error)
- func KillPidWithSignal(ctx context.Context, pid int, signal int) error
- func KillProcessByKey(ctx context.Context, key string, signal int) error
- func SignalProcessByKey(ctx context.Context, cr, cId string, key string, signal int) error
- func SignalProcessByPid(ctx context.Context, cr, cId string, pid, signal int) error
- func WaitDefunctProcess(ctx context.Context)
Constants ¶
View Source
const ( SIGKILL = 9 SIGTERM = 15 SIGSTOP = 19 SIGCONT = 18 )
signal
Variables ¶
This section is empty.
Functions ¶
func CheckExistAndKillByKey ¶
func GetPidListByKey ¶
GetPidListByKey return pidList in host's pid ns, not in container's pid ns
func GetPidListByPidOrKeyInContainer ¶
func GetPidListByPidOrKeyInContainer(ctx context.Context, cr, cId string, pid int, key string) ([]int, error)
GetPidListByPidOrKeyInContainer return pidList in host's or container's pid ns
func GetProcessByKey ¶
GetProcessByKey in container's pid namespace
func GetProcessByPid ¶
GetProcessByPid in container's pid namespace
func SignalProcessByKey ¶
SignalProcessByKey in container's pid namespace
func SignalProcessByPid ¶
SignalProcessByPid in container's pid namespace
func WaitDefunctProcess ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.