diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-09 13:51:20 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2017-11-18 12:58:48 -0500 |
commit | 763e3726493c122d9722e0e294634ae8d78c426b (patch) | |
tree | a2b34450ab0dfe2131786315f393a1f7ca05ffdd /libpod/options.go | |
parent | cb56716fc4bb632db84fab372fff8f5a9007ed3f (diff) | |
download | podman-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.go | 14 |
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 { |