Skip to content

Commit

Permalink
Add Annotations to the state
Browse files Browse the repository at this point in the history
`Annotations` 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 Nov 17, 2015
1 parent 8faa71e commit 161c98e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ This allows the hooks to perform cleanup and teardown logic after the runtime de
* **`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.

* **`annotations`**: (interface) holds runtime-specified information that is not structured by this specification.
The runtime could store experimental information here before it's standardized in this specification.

*Example*

```json
Expand Down
2 changes: 2 additions & 0 deletions state.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ type State struct {
Pid int `json:"pid"`
// BundlePath is the path to the container's bundle directory.
BundlePath string `json:"bundlePath"`
// Annotations holds runtime-specified information that is not structured by this specification.
Annotations interface{} `json:"annotations"`
}

0 comments on commit 161c98e

Please sign in to comment.