netns

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 LoadNetNS

func LoadNetNS(path string) *NetNS

LoadNetNS loads existing network namespace.

func NewNetNS

func NewNetNS() (*NetNS, error)

NewNetNS creates a network namespace.

func (*NetNS) Closed

func (n *NetNS) Closed() (bool, error)

Closed checks whether the network namespace has been closed.

func (*NetNS) Do

func (n *NetNS) Do(f func(cnins.NetNS) error) error

Do runs a function in the network namespace.

func (*NetNS) GetPath

func (n *NetNS) GetPath() string

GetPath returns network namespace path for sandbox container

func (*NetNS) Remove

func (n *NetNS) Remove() error

Remove removes network namepace. Remove is idempotent, meaning it might be invoked multiple times and provides consistent result.

Jump to

Keyboard shortcuts

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