Documentation ¶
Index ¶
- Constants
- func ExecCommandContainerNSEnter(command string, aContainer *provider.Container) (outStr, errStr string, err error)
- func GetContainerPidNamespace(testContainer *provider.Container, env *provider.TestEnvironment) (string, error)
- func GetNodeProbePodContext(node string, env *provider.TestEnvironment) (clientsholder.Context, error)
- func GetPidFromContainer(cut *provider.Container, ctx clientsholder.Context) (int, error)
- type Process
Constants ¶
View Source
const ( DevNull = " 2>/dev/null" DockerInspectPID = "chroot /host docker inspect -f '{{.State.Pid}}' " )
View Source
const PsRegex = `(?m)^(\d+?)\s+?(\d+?)\s+?(\d+?)\s+?(.*?)$`
Variables ¶
This section is empty.
Functions ¶
func ExecCommandContainerNSEnter ¶
func ExecCommandContainerNSEnter(command string, aContainer *provider.Container) (outStr, errStr string, err error)
ExecCommandContainerNSEnter executes a command in the specified container namespace using nsenter
func GetContainerPidNamespace ¶
func GetContainerPidNamespace(testContainer *provider.Container, env *provider.TestEnvironment) (string, error)
To get the pid namespace of the container
func GetNodeProbePodContext ¶
func GetNodeProbePodContext(node string, env *provider.TestEnvironment) (clientsholder.Context, error)
Helper function to create the clientsholder.Context of the first container of the probe pod that runs in the give node. This context is usually needed to run shell commands that get information from a node where a pod/container under test is running.
func GetPidFromContainer ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.