@@ -12,6 +12,7 @@ type LinuxRuntimeSpec struct {
1212 Linux LinuxRuntime `json:"linux"`
1313}
1414
15+ // LinuxRuntime hosts the Linux-only runtime information
1516type LinuxRuntime struct {
1617 // UIDMapping specifies user mappings for supporting user namespaces on linux.
1718 UIDMappings []IDMapping `json:"uidMappings"`
@@ -38,7 +39,7 @@ type LinuxRuntime struct {
3839 RootfsPropagation string `json:"rootfsPropagation"`
3940}
4041
41- // Namespace is the configuration for a linux namespace.
42+ // Namespace is the configuration for a linux namespace
4243type Namespace struct {
4344 // Type is the type of Linux namespace
4445 Type NamespaceType `json:"type"`
@@ -51,12 +52,18 @@ type Namespace struct {
5152type NamespaceType string
5253
5354const (
54- PIDNamespace NamespaceType = "pid"
55- NetworkNamespace = "network"
56- MountNamespace = "mount"
57- IPCNamespace = "ipc"
58- UTSNamespace = "uts"
59- UserNamespace = "user"
55+ // PIDNamespace for isolating process IDs
56+ PIDNamespace NamespaceType = "pid"
57+ // NetworkNamespace for isolating network devices, stacks, ports, etc
58+ NetworkNamespace = "network"
59+ // MountNamespace for isolating mount points
60+ MountNamespace = "mount"
61+ // IPCNamespace for isolating System V IPC, POSIX message queues
62+ IPCNamespace = "ipc"
63+ // UTSNamespace for isolating hostname and NIS domain name
64+ UTSNamespace = "uts"
65+ // UserNamespace for isolating user and group IDs
66+ UserNamespace = "user"
6067)
6168
6269// IDMapping specifies UID/GID mappings
@@ -141,6 +148,7 @@ type CPU struct {
141148 Mems string `json:"mems"`
142149}
143150
151+ // Pids for Linux cgroup 'pids' resource management (Linux 4.3)
144152type Pids struct {
145153 // Maximum number of PIDs. A value < 0 implies "no limit".
146154 Limit int64 `json:"limit"`
@@ -172,6 +180,7 @@ type Resources struct {
172180 Network Network `json:"network"`
173181}
174182
183+ // Device represents the information on a Linux special device file
175184type Device struct {
176185 // Path to the device.
177186 Path string `json:"path"`
0 commit comments