From 161c98e9ab5b06025ce4353182dca6e947d6bf2c Mon Sep 17 00:00:00 2001 From: Gao feng Date: Tue, 17 Nov 2015 10:19:33 +0800 Subject: [PATCH] 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 --- runtime.md | 3 +++ state.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/runtime.md b/runtime.md index fdaf96519..9e307f8cd 100644 --- a/runtime.md +++ b/runtime.md @@ -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 diff --git a/state.go b/state.go index a6633815d..c1af42e0c 100644 --- a/state.go +++ b/state.go @@ -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"` }