diff options
author | baude <bbaude@redhat.com> | 2019-07-01 13:35:16 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-01 14:15:44 -0500 |
commit | d0a0a3fbd9ebb2942c761f14fc56f3a470ae1834 (patch) | |
tree | bc4eeec5c61000bf3cc36a171afd8a47b1ae9681 /libpod/options.go | |
parent | 150778820f0f6d9f7ffdb672a8b136804378f025 (diff) | |
download | podman-d0a0a3fbd9ebb2942c761f14fc56f3a470ae1834.tar.gz podman-d0a0a3fbd9ebb2942c761f14fc56f3a470ae1834.tar.bz2 podman-d0a0a3fbd9ebb2942c761f14fc56f3a470ae1834.zip |
configure runtime without store
some podman commands do not require the use of a container/image store.
in those cases, it is more effecient to not open the store, because that
results in having to also close the store which can be costly when the
system is under heavy write I/O loads.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 0f23a6c97..78634e953 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -300,6 +300,15 @@ func WithTmpDir(dir string) RuntimeOption { } } +// WithNoStore sets a bool on the runtime that we do not need +// any containers storage. +func WithNoStore() RuntimeOption { + return func(rt *Runtime) error { + rt.noStore = true + return nil + } +} + // WithMaxLogSize sets the maximum size of container logs. // Positive sizes are limits in bytes, -1 is unlimited. func WithMaxLogSize(limit int64) RuntimeOption { |