From 21c9dc3c406bb486c44c4a27e5b0497bab1cd40d Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 30 Sep 2021 14:43:39 -0400 Subject: Add --time out for podman * rm -f commands Add --time flag to podman container rm Add --time flag to podman pod rm Add --time flag to podman volume rm Add --time flag to podman network rm Signed-off-by: Daniel J Walsh --- pkg/bindings/pods/types.go | 3 ++- pkg/bindings/pods/types_remove_options.go | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'pkg/bindings/pods') diff --git a/pkg/bindings/pods/types.go b/pkg/bindings/pods/types.go index cb41cf623..71fada4eb 100644 --- a/pkg/bindings/pods/types.go +++ b/pkg/bindings/pods/types.go @@ -68,7 +68,8 @@ type StatsOptions struct { //go:generate go run ../generator/generator.go RemoveOptions // RemoveOptions are optional options for removing pods type RemoveOptions struct { - Force *bool + Force *bool + Timeout *uint } //go:generate go run ../generator/generator.go ExistsOptions diff --git a/pkg/bindings/pods/types_remove_options.go b/pkg/bindings/pods/types_remove_options.go index ce142ee74..bbcc4d769 100644 --- a/pkg/bindings/pods/types_remove_options.go +++ b/pkg/bindings/pods/types_remove_options.go @@ -31,3 +31,18 @@ func (o *RemoveOptions) GetForce() bool { } return *o.Force } + +// WithTimeout set field Timeout to given value +func (o *RemoveOptions) WithTimeout(value uint) *RemoveOptions { + o.Timeout = &value + return o +} + +// GetTimeout returns value of field Timeout +func (o *RemoveOptions) GetTimeout() uint { + if o.Timeout == nil { + var z uint + return z + } + return *o.Timeout +} -- cgit v1.2.3-54-g00ecf