summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/container.go9
-rw-r--r--libpod/define/container_inspect.go2
2 files changed, 10 insertions, 1 deletions
diff --git a/libpod/define/container.go b/libpod/define/container.go
index 5a2ff026f..f3125afa9 100644
--- a/libpod/define/container.go
+++ b/libpod/define/container.go
@@ -17,3 +17,12 @@ const (
// handling of system restart, which Podman does not yet support.
RestartPolicyUnlessStopped = "unless-stopped"
)
+
+// RestartPolicyMap maps between restart-policy valid values to restart policy types
+var RestartPolicyMap = map[string]string{
+ "none": RestartPolicyNone,
+ RestartPolicyNo: RestartPolicyNo,
+ RestartPolicyAlways: RestartPolicyAlways,
+ RestartPolicyOnFailure: RestartPolicyOnFailure,
+ RestartPolicyUnlessStopped: RestartPolicyUnlessStopped,
+}
diff --git a/libpod/define/container_inspect.go b/libpod/define/container_inspect.go
index c236f35b0..5283946fa 100644
--- a/libpod/define/container_inspect.go
+++ b/libpod/define/container_inspect.go
@@ -66,7 +66,7 @@ type InspectContainerConfig struct {
Secrets []*InspectSecret `json:"Secrets,omitempty"`
// Timeout is time before container is killed by conmon
Timeout uint `json:"Timeout"`
- // StopTimeout is time before container is stoped when calling stop
+ // StopTimeout is time before container is stopped when calling stop
StopTimeout uint `json:"StopTimeout"`
}