namespace

package
v0.0.0-...-92a250d Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Namespace

type Namespace interface {
	Execute(func(*os.File) error) error
	Name() string
	Fd() uintptr
}

type Netns

type Netns struct {
	*os.File
	Logger       lager.Logger
	ThreadLocker ossupport.OSThreadLocker
}

func (*Netns) Execute

func (n *Netns) Execute(callback func(*os.File) error) error

func (*Netns) MarshalJSON

func (n *Netns) MarshalJSON() ([]byte, error)

func (*Netns) String

func (n *Netns) String() string

type Opener

type Opener interface {
	OpenPath(path string) (Namespace, error)
}

type PathOpener

type PathOpener struct {
	Logger       lager.Logger
	ThreadLocker ossupport.OSThreadLocker
}

func (*PathOpener) OpenPath

func (po *PathOpener) OpenPath(path string) (Namespace, error)

type Repository

type Repository interface {
	Get(name string) (Namespace, error)
	Create(name string) (Namespace, error)
	Destroy(ns Namespace) error
	PathOf(path string) string
}

func NewRepository

func NewRepository(logger lager.Logger, root string, threadLocker ossupport.OSThreadLocker) (Repository, error)

Jump to

Keyboard shortcuts

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