Documentation ¶
Overview ¶
+build linux,x86_64
namespace implements low level APIs for moving a process into a given Linux Namespace.
Index ¶
Constants ¶
View Source
const ( CLONE_NEWNS = 0x00020000 CLONE_NEWUTS = 0x04000000 CLONE_NEWIPC = 0x08000000 CLONE_NEWNET = 0x40000000 CLONE_NEWUSER = 0x10000000 CLONE_NEWPID = 0x20000000 )
Namespaces
View Source
const (
SYS_SETNS = 308
)
Variables ¶
View Source
var (
Types []Namespace
)
Functions ¶
func Open ¶
Opens the given path and returns the raw file descriptor. The returned fd acts as the handle to the namespace.
func OpenProcess ¶
OpenProcess opens a file descriptor for a given pid and type and returns the open fd. The caller is responsible for closing the fd.
func ProcessPath ¶
ProcessPath returns the path to a namespace given a target pid and namespace type.
Types ¶
Click to show internal directories.
Click to hide internal directories.