namespace

package
v0.0.0-...-5c345c6 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 8 Imported by: 0

README

namespace

namespace

Usage

type IDMap
type IDMap struct {
	ID     uint64 `json:"id"`
	HostID uint64 `json:"hostID"`
	Length uint64 `json:"length"`
}

IDMap is a map of id in container to id on host and length of a range.

type Mock
type Mock struct {
	Data MockData
}

Mock is a mock Namespace provider.

func NewMock
func NewMock() *Mock

NewMock creates a new instance of Mock.

func (*Mock) RegisterTasks
func (n *Mock) RegisterTasks(server *provider.Server)

RegisterTasks registers all of Mock's task handlers.

func (*Mock) SetUser
func (n *Mock) SetUser(req *acomm.Request) (interface{}, *url.URL, error)

SetUser sets mock uid and gid mappings.

type MockData
type MockData struct {
	SetUserErr error
}

MockData is the in-memory data structure for a Mock.

type Namespace
type Namespace struct {
}

Namespace is a provider of namespace functionality.

func New
func New(config *provider.Config, tracker *acomm.Tracker) *Namespace

New creates a new instance of Namespace.

func (*Namespace) RegisterTasks
func (n *Namespace) RegisterTasks(server *provider.Server)

RegisterTasks registers all of Namespaces's task handlers with the server.

func (*Namespace) SetUser
func (n *Namespace) SetUser(req *acomm.Request) (interface{}, *url.URL, error)

SetUser sets the user and group id mapping for a process.

type UserArgs
type UserArgs struct {
	PID  uint64  `json:"pid"`
	UIDs []IDMap `json:"uids"`
	GIDs []IDMap `json:"gids"`
}

UserArgs are arguments for SetUser.

-- Generated with godocdown

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDMap

type IDMap struct {
	ID     uint64 `json:"id"`
	HostID uint64 `json:"hostID"`
	Length uint64 `json:"length"`
}

IDMap is a map of id in container to id on host and length of a range.

type Mock

type Mock struct {
	Data MockData
}

Mock is a mock Namespace provider.

func NewMock

func NewMock() *Mock

NewMock creates a new instance of Mock.

func (*Mock) RegisterTasks

func (n *Mock) RegisterTasks(server *provider.Server)

RegisterTasks registers all of Mock's task handlers.

func (*Mock) SetUser

func (n *Mock) SetUser(req *acomm.Request) (interface{}, *url.URL, error)

SetUser sets mock uid and gid mappings.

type MockData

type MockData struct {
	SetUserErr error
}

MockData is the in-memory data structure for a Mock.

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

Namespace is a provider of namespace functionality.

func New

func New(config *provider.Config, tracker *acomm.Tracker) *Namespace

New creates a new instance of Namespace.

func (*Namespace) RegisterTasks

func (n *Namespace) RegisterTasks(server *provider.Server)

RegisterTasks registers all of Namespaces's task handlers with the server.

func (*Namespace) SetUser

func (n *Namespace) SetUser(req *acomm.Request) (interface{}, *url.URL, error)

SetUser sets the user and group id mapping for a process.

type UserArgs

type UserArgs struct {
	PID  uint64  `json:"pid"`
	UIDs []IDMap `json:"uids"`
	GIDs []IDMap `json:"gids"`
}

UserArgs are arguments for SetUser.

Jump to

Keyboard shortcuts

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