Refactor ProcessConfig

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2015-11-01 07:53:15 -08:00
parent 7adfb3221e
commit 5fa2e4d4f2
10 changed files with 74 additions and 56 deletions

View File

@@ -112,18 +112,15 @@ type ResourceStats struct {
SystemUsage uint64 `json:"system_usage"`
}
// ProcessConfig describes a process that will be run inside a container.
type ProcessConfig struct {
// CommonProcessConfig is the common platform agnostic part of the ProcessConfig
// structure that describes a process that will be run inside a container.
type CommonProcessConfig struct {
exec.Cmd `json:"-"`
Privileged bool `json:"privileged"`
User string `json:"user"`
Tty bool `json:"tty"`
Entrypoint string `json:"entrypoint"`
Arguments []string `json:"arguments"`
Terminal Terminal `json:"-"` // standard or tty terminal (Unix)
Console string `json:"-"` // dev/console path (Unix)
ConsoleSize [2]int `json:"-"` // h,w of initial console size (Windows)
Tty bool `json:"tty"`
Entrypoint string `json:"entrypoint"`
Arguments []string `json:"arguments"`
Terminal Terminal `json:"-"` // standard or tty terminal
}
// CommonCommand is the common platform agnostic part of the Command structure