summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-09 13:51:20 -0500
committerMatthew Heon <matthew.heon@gmail.com>2017-11-18 12:58:48 -0500
commit763e3726493c122d9722e0e294634ae8d78c426b (patch)
treea2b34450ab0dfe2131786315f393a1f7ca05ffdd /libpod/options.go
parentcb56716fc4bb632db84fab372fff8f5a9007ed3f (diff)
downloadpodman-763e3726493c122d9722e0e294634ae8d78c426b.tar.gz
podman-763e3726493c122d9722e0e294634ae8d78c426b.tar.bz2
podman-763e3726493c122d9722e0e294634ae8d78c426b.zip
Wire SQL backed state into rest of libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index fb64c0c41..4c21a70c9 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -94,6 +94,20 @@ func WithSignaturePolicy(path string) RuntimeOption {
}
}
+// WithInMemoryState specifies that the runtime will be backed by an in-memory
+// state only, and state will not persist after the runtime is shut down
+func WithInMemoryState() RuntimeOption {
+ return func(rt *Runtime) error {
+ if rt.valid {
+ return ErrRuntimeFinalized
+ }
+
+ rt.config.InMemoryState = true
+
+ return nil
+ }
+}
+
// WithOCIRuntime specifies an OCI runtime to use for running containers
func WithOCIRuntime(runtimePath string) RuntimeOption {
return func(rt *Runtime) error {