namespace

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotNamedNamespace = fmt.Errorf("name space is not named")
)

Functions

func Create

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

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

func Delete

func Delete(ns ns.NetNS) error

Delete deletes a network namespace

func Exists

func Exists(name string) bool

Exists checks if a network namespace exists or not

func GetByName

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

GetByName return a namespace by its name

func List added in v0.4.9

func List(prefix string) ([]string, error)

List returns a list of all the names of the network namespaces

func Monitor

func Monitor(ctx context.Context, name string) (chan netlink.AddrUpdate, error)

Monitor the dmz namespace for updates

func Name added in v0.5.5

func Name(ns ns.NetNS) (string, error)

Name gets the name of the namespace if it was created with Create otherwise return ErrNotNamedNamespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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