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