Merge pull request #154 from vbatts/golint

runtime_config: comments for golint
This commit is contained in:
Mrunal Patel 2015-09-04 14:16:52 -07:00
commit 9d59c53bbf
2 changed files with 20 additions and 9 deletions

View File

@ -1,5 +1,6 @@
package specs
// RuntimeSpec is the generic runtime state information on a running container
type RuntimeSpec struct {
// Mounts is a mapping of names to mount configurations.
// Which mounts will be mounted and where should be chosen with MountPoints
@ -9,13 +10,14 @@ type RuntimeSpec struct {
Hooks Hooks `json:"hooks"`
}
// Hook specifies a command that is run at a particular event in the lifecycle of a container.
// Hook specifies a command that is run at a particular event in the lifecycle of a container
type Hook struct {
Path string `json:"path"`
Args []string `json:"args"`
Env []string `json:"env"`
}
// Hooks for container setup and teardown
type Hooks struct {
// Prestart is a list of hooks to be run before the container process is executed.
// On Linux, they are run after the container namespaces are created.
@ -24,7 +26,7 @@ type Hooks struct {
Poststop []Hook `json:"poststop"`
}
// Mount specifies a mount for a container.
// Mount specifies a mount for a container
type Mount struct {
// Type specifies the mount kind.
Type string `json:"type"`

View File

@ -12,6 +12,7 @@ type LinuxRuntimeSpec struct {
Linux LinuxRuntime `json:"linux"`
}
// LinuxRuntime hosts the Linux-only runtime information
type LinuxRuntime struct {
// UIDMapping specifies user mappings for supporting user namespaces on linux.
UIDMappings []IDMapping `json:"uidMappings"`
@ -38,7 +39,7 @@ type LinuxRuntime struct {
RootfsPropagation string `json:"rootfsPropagation"`
}
// Namespace is the configuration for a linux namespace.
// Namespace is the configuration for a linux namespace
type Namespace struct {
// Type is the type of Linux namespace
Type NamespaceType `json:"type"`
@ -51,11 +52,17 @@ type Namespace struct {
type NamespaceType string
const (
// PIDNamespace for isolating process IDs
PIDNamespace NamespaceType = "pid"
// NetworkNamespace for isolating network devices, stacks, ports, etc
NetworkNamespace = "network"
// MountNamespace for isolating mount points
MountNamespace = "mount"
// IPCNamespace for isolating System V IPC, POSIX message queues
IPCNamespace = "ipc"
// UTSNamespace for isolating hostname and NIS domain name
UTSNamespace = "uts"
// UserNamespace for isolating user and group IDs
UserNamespace = "user"
)
@ -141,6 +148,7 @@ type CPU struct {
Mems string `json:"mems"`
}
// Pids for Linux cgroup 'pids' resource management (Linux 4.3)
type Pids struct {
// Maximum number of PIDs. A value < 0 implies "no limit".
Limit int64 `json:"limit"`
@ -172,6 +180,7 @@ type Resources struct {
Network Network `json:"network"`
}
// Device represents the information on a Linux special device file
type Device struct {
// Path to the device.
Path string `json:"path"`