Documentation ¶
Index ¶
Constants ¶
View Source
const ( NSMNT = "mnt" NSUTS = "uts" NSIPC = "ipc" NSUSER = "user" NSPID = "pid" NSNET = "net" NSCGROUP = "cgroup" )
Variables ¶
View Source
var (
ErrNotImplemented = errors.New("not implemented")
)
View Source
var SYS_SETNS = map[string]uintptr{ "386": 346, "amd64": 308, "arm64": 268, "arm": 375, "ppc64": 350, "ppc64le": 350, "s390x": 339, }[runtime.GOARCH]
SYS_SETNS syscall allows changing the namespace of the current process.
Functions ¶
Types ¶
type NsHandle ¶
type NsHandle struct {
// contains filtered or unexported fields
}
NsHandle is a handle to a network namespace. It can be cast directly to an int and used as a file descriptor.
func CurNsHandle ¶
func (NsHandle) Close ¶
Close closes the NsHandle and resets its file descriptor to -1. It is not safe to use an NsHandle after Close() is called.
Click to show internal directories.
Click to hide internal directories.