Define constants for Linux Namespace names

Signed-off-by: Julian Friedman <julz.friedman@uk.ibm.com>
This commit is contained in:
Julian Friedman 2015-09-04 19:22:11 +01:00
parent 527a3eec38
commit 47282257b8
1 changed files with 13 additions and 1 deletions

View File

@ -41,12 +41,24 @@ type LinuxRuntime struct {
// Namespace is the configuration for a linux namespace.
type Namespace struct {
// Type is the type of Linux namespace
Type string `json:"type"`
Type NamespaceType `json:"type"`
// Path is a path to an existing namespace persisted on disk that can be joined
// and is of the same type
Path string `json:"path"`
}
// NamespaceType is one of the linux namespaces
type NamespaceType string
const (
PIDNamespace NamespaceType = "pid"
NetworkNamespace = "network"
MountNamespace = "mount"
IPCNamespace = "ipc"
UTSNamespace = "uts"
UserNamespace = "user"
)
// IDMapping specifies UID/GID mappings
type IDMapping struct {
// HostID is the UID/GID of the host user or group