Documentation

Index

Constants

View Source
const NetNSRunDir = "/var/run/netns"

    NetNSRunDir is the directory which new network namespaces will be bind mounted

    Variables

    This section is empty.

    Functions

    func NewNS

    func NewNS(nsName string) (ns.NetNS, error)

      NewNS 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 NS held by the netns object

        Types

        This section is empty.

        Source Files