package namespaces

import "github.com/docker/libcontainer/namespaces"

Index

Variables

var (
	ErrUnkownNamespace = errors.New("Unknown namespace")
	ErrUnsupported     = errors.New("Unsupported method")
)

namespaceList is used to convert the libcontainer types into the names of the files located in /proc/<pid>/ns/* for each namespace

Types

type CreateCommand

type CreateCommand func(container *libcontainer.Config, console, rootfs, dataPath, init string, childPipe *os.File, args []string) *exec.Cmd

type Namespace

type Namespace struct {
	Key   string `json:"key,omitempty"`
	Value int    `json:"value,omitempty"`
	File  string `json:"file,omitempty"`
}

func GetNamespace

func GetNamespace(key string) *Namespace

func (*Namespace) String

func (ns *Namespace) String() string

type Namespaces

type Namespaces []*Namespace

func (Namespaces) Contains

func (n Namespaces) Contains(ns string) bool

Contains returns true if the specified Namespace is in the slice

func (Namespaces) Get

func (n Namespaces) Get(ns string) *Namespace

Source Files

create.go types.go

Directories

PathSynopsis
namespaces/nsenter
Version
v1.2.0
Published
Aug 20, 2014
Platform
darwin/amd64
Imports
4 packages
Last checked
2 hours ago

Tools for package owners.