Skip to content

Commit

Permalink
Add labels to the state
Browse files Browse the repository at this point in the history
`Labels` is used to store some runtime specified informations,
these informations may be meaningless to other runtime, but it's
userful for the same runtime to operate this container.

Signed-off-by: Gao feng <[email protected]>
  • Loading branch information
gao-feng committed Oct 9, 2015
1 parent cfa992b commit a7eda6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ type State struct {
Pid int `json:"pid"`
// BundlePath is the path to the container's bundle directory.
BundlePath string `json:"bundlePath"`
// Lables is the runtime itself specified information.
Labels map[string]string `json:"labels"`
}
2 changes: 2 additions & 0 deletions runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ This allows the hooks to perform cleanup and teardown logic after the runtime de
* **`pid`**: (int) is the ID of the main process within the container, as seen by the host.
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
This is provided so that consumers can find the container's configuration and root filesystem on the host.
* **`Labels`**: (map) Labels is the runtime itself specified information.
This allows runtime to store some informations which are usefull for itself but meaningless for other runtime.

*Example*

Expand Down

0 comments on commit a7eda6f

Please sign in to comment.