summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-01 08:46:11 +0000
committerGitHub <noreply@github.com>2022-07-01 08:46:11 +0000
commit96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857 (patch)
treecf1617923f618ae0bf1819486f4f425310245db8 /libpod/options.go
parent01beba3667851c1dd68d3df1e0aa6bc8cb1ec0eb (diff)
parent7b3e43c1f6cf27a1cde96c0f650a793a56cebc4c (diff)
downloadpodman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.tar.gz
podman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.tar.bz2
podman-96e72d90b8a6b1d9fb71dadfddff1ed4ccf05857.zip
Merge pull request #14449 from cdoern/podVolumes
podman volume create --opt=o=timeout...
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 9a29fb279..3f9a0424a 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -1693,6 +1693,18 @@ func withSetAnon() VolumeCreateOption {
}
}
+// WithVolumeDriverTimeout sets the volume creation timeout period
+func WithVolumeDriverTimeout(timeout int) VolumeCreateOption {
+ return func(volume *Volume) error {
+ if volume.valid {
+ return define.ErrVolumeFinalized
+ }
+
+ volume.config.Timeout = timeout
+ return nil
+ }
+}
+
// WithTimezone sets the timezone in the container
func WithTimezone(path string) CtrCreateOption {
return func(ctr *Container) error {