Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetNS ¶
type NetNS struct {
// contains filtered or unexported fields
}
NetNS holds network namespace.
func NewNetNS ¶
NewNetNS creates a network namespace. The name of the network namespace is randomly generated. The returned netns is created under baseDir, with its path following the pattern "baseDir/<generated-name>".
func NewNetNSFromPID ¶
NewNetNSFromPID returns the netns from pid or a new netns if pid is 0. The name of the network namespace is randomly generated. The returned netns is created under baseDir, with its path following the pattern "baseDir/<generated-name>".
Click to show internal directories.
Click to hide internal directories.