netns

package
v0.51.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNSRunDir

func GetNSRunDir() (string, error)

GetNSRunDir returns the dir of where to create the netNS. When running rootless, it needs to be at a location writable by user.

func NewNS

func NewNS() (ns.NetNS, error)

NewNS creates a new persistent (bind-mounted) network namespace and returns an object representing that namespace, without switching to it.

func NewNSWithName

func NewNSWithName(name string) (ns.NetNS, error)

NewNSWithName creates a new persistent (bind-mounted) network namespace and returns an object representing that namespace, without switching to it.

func UnmountNS

func UnmountNS(nsPath string) error

UnmountNS unmounts the given netns path

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL