Skip to content

Commit

Permalink
change the user of the Process to a json.RawMessage
Browse files Browse the repository at this point in the history
The type of `user` becomes `json.RawMessage` instead of platform aware
structure, so the Spec becomes a platform-independent structure.

It makes we can parse the config.json as a Spec before knowing
the os, and allows we move the linux related *.go to linux/.

The runtime should parse the user with the corresponding platform
specific User structure.

Signed-off-by: Lai Jiangshan <[email protected]>
  • Loading branch information
laijs committed Sep 9, 2015
1 parent 6cc6798 commit 44b4415
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package specs

import (
"encoding/json"
)

// Spec is the base configuration for the container. It specifies platform
// independent configuration.
type Spec struct {
Expand All @@ -21,8 +25,8 @@ type Spec struct {
type Process struct {
// Terminal creates an interactive terminal for the container.
Terminal bool `json:"terminal"`
// User specifies user information for the process.
User User `json:"user"`
// User specifies user information for the process. It is a platform-specific structure.
User json.RawMessage `json:"user"`
// Args specifies the binary and arguments for the application to execute.
Args []string `json:"args"`
// Env populates the process environment for the process.
Expand Down

0 comments on commit 44b4415

Please sign in to comment.