summaryrefslogtreecommitdiff
path: root/libpod/define/container.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/define/container.go')
-rw-r--r--libpod/define/container.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/libpod/define/container.go b/libpod/define/container.go
new file mode 100644
index 000000000..5a2ff026f
--- /dev/null
+++ b/libpod/define/container.go
@@ -0,0 +1,19 @@
+package define
+
+// Valid restart policy types.
+const (
+ // RestartPolicyNone indicates that no restart policy has been requested
+ // by a container.
+ RestartPolicyNone = ""
+ // RestartPolicyNo is identical in function to RestartPolicyNone.
+ RestartPolicyNo = "no"
+ // RestartPolicyAlways unconditionally restarts the container.
+ RestartPolicyAlways = "always"
+ // RestartPolicyOnFailure restarts the container on non-0 exit code,
+ // with an optional maximum number of retries.
+ RestartPolicyOnFailure = "on-failure"
+ // RestartPolicyUnlessStopped unconditionally restarts unless stopped
+ // by the user. It is identical to Always except with respect to
+ // handling of system restart, which Podman does not yet support.
+ RestartPolicyUnlessStopped = "unless-stopped"
+)