Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ContainerRuntimes contains all the container runtimes. ContainerRuntimes = []ContainerRuntime{ RuntimeDocker, RuntimeRkt, RuntimeNspawn, RuntimeLXC, RuntimeLXCLibvirt, RuntimeOpenVZ, RuntimeKubernetes, RuntimeGarden, RuntimePodman, RuntimeGVisor, RuntimeFirejail, RuntimeWSL, } )
Functions ¶
This section is empty.
Types ¶
type ContainerRuntime ¶
type ContainerRuntime string
ContainerRuntime is the type for the various container runtime strings.
const ( // RuntimeDocker is the string for the docker runtime. RuntimeDocker ContainerRuntime = "docker" // RuntimeRkt is the string for the rkt runtime. RuntimeRkt ContainerRuntime = "rkt" // RuntimeNspawn is the string for the systemd-nspawn runtime. RuntimeNspawn ContainerRuntime = "systemd-nspawn" // RuntimeLXC is the string for the lxc runtime. RuntimeLXC ContainerRuntime = "lxc" // RuntimeLXCLibvirt is the string for the lxc-libvirt runtime. RuntimeLXCLibvirt ContainerRuntime = "lxc-libvirt" // RuntimeOpenVZ is the string for the openvz runtime. RuntimeOpenVZ ContainerRuntime = "openvz" // RuntimeKubernetes is the string for the kubernetes runtime. RuntimeKubernetes ContainerRuntime = "kube" // RuntimeGarden is the string for the garden runtime. RuntimeGarden ContainerRuntime = "garden" // RuntimePodman is the string for the podman runtime. RuntimePodman ContainerRuntime = "podman" // RuntimeGVisor is the string for the gVisor (runsc) runtime. RuntimeGVisor ContainerRuntime = "gvisor" // RuntimeFirejail is the string for the firejail runtime. RuntimeFirejail ContainerRuntime = "firejail" // RuntimeWSL is the string for the Windows Subsystem for Linux runtime. RuntimeWSL ContainerRuntime = "wsl" // RuntimeNotFound is the string for when no container runtime is found. RuntimeNotFound ContainerRuntime = "not-found" )
func GetContainerRuntime ¶
func GetContainerRuntime(tgid, pid int) ContainerRuntime
GetContainerRuntime returns the container runtime the process is running in. If pid is less than one, it returns the runtime for "self".
Click to show internal directories.
Click to hide internal directories.