Skip to content

Commit 161c98e

Browse files
committed
Add Annotations to the state
`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]>
1 parent 8faa71e commit 161c98e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: runtime.md

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ This allows the hooks to perform cleanup and teardown logic after the runtime de
2323
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
2424
This is provided so that consumers can find the container's configuration and root filesystem on the host.
2525

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

2831
```json

Diff for: state.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ type State struct {
1313
Pid int `json:"pid"`
1414
// BundlePath is the path to the container's bundle directory.
1515
BundlePath string `json:"bundlePath"`
16+
// Annotations holds runtime-specified information that is not structured by this specification.
17+
Annotations interface{} `json:"annotations"`
1618
}

0 commit comments

Comments
 (0)