diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-07 16:30:49 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2022-01-10 09:37:55 -0500 |
commit | 01ba2531b31673c04230522e0723b8dc9d3a9ed1 (patch) | |
tree | c1ce8d74203445c1cf1a7dae8dc97ebd45f13f7b | |
parent | b5b932f7abebe58f8eb841fc0ac894785a167aa3 (diff) | |
download | podman-01ba2531b31673c04230522e0723b8dc9d3a9ed1.tar.gz podman-01ba2531b31673c04230522e0723b8dc9d3a9ed1.tar.bz2 podman-01ba2531b31673c04230522e0723b8dc9d3a9ed1.zip |
Remove dead RuntimeOption functions
I don't see where these With Functions are used, so removing them to
clean up code.
WithDefaultInfra* functions screwed me up and confused me.
[NO NEW TESTS NEEDED]
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
-rw-r--r-- | libpod/options.go | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/libpod/options.go b/libpod/options.go index 6edb9972b..44505da26 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -115,19 +115,6 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption { } } -// WithDefaultTransport sets the default transport for retrieving images. -func WithDefaultTransport(defaultTransport string) RuntimeOption { - return func(rt *Runtime) error { - if rt.valid { - return define.ErrRuntimeFinalized - } - - rt.config.Engine.ImageDefaultTransport = defaultTransport - - return nil - } -} - // WithSignaturePolicy specifies the path of a file which decides how trust is // managed for images we've pulled. // If this is not specified, the system default configuration will be used @@ -144,26 +131,6 @@ func WithSignaturePolicy(path string) RuntimeOption { } } -// WithStateType sets the backing state implementation for libpod. -// Please note that information is not portable between backing states. -// As such, if this differs between two libpods running on the same system, -// they will not share containers, and unspecified behavior may occur. -func WithStateType(storeType config.RuntimeStateStore) RuntimeOption { - return func(rt *Runtime) error { - if rt.valid { - return define.ErrRuntimeFinalized - } - - if storeType == config.InvalidStateStore { - return errors.Wrapf(define.ErrInvalidArg, "must provide a valid state store type") - } - - rt.config.Engine.StateType = storeType - - return nil - } -} - // WithOCIRuntime specifies an OCI runtime to use for running containers. func WithOCIRuntime(runtime string) RuntimeOption { return func(rt *Runtime) error { @@ -452,23 +419,6 @@ func WithVolumePath(volPath string) RuntimeOption { } } -// WithDefaultInfraImage sets the infra image for libpod. -// An infra image is used for inter-container kernel -// namespace sharing within a pod. Typically, an infra -// container is lightweight and is there to reap -// zombie processes within its pid namespace. -func WithDefaultInfraImage(img string) RuntimeOption { - return func(rt *Runtime) error { - if rt.valid { - return define.ErrRuntimeFinalized - } - - rt.config.Engine.InfraImage = img - - return nil - } -} - // WithDefaultInfraCommand sets the command to // run on pause container start up. func WithDefaultInfraCommand(cmd string) RuntimeOption { @@ -483,19 +433,6 @@ func WithDefaultInfraCommand(cmd string) RuntimeOption { } } -// WithDefaultInfraName sets the infra container name for a single pod. -func WithDefaultInfraName(name string) RuntimeOption { - return func(rt *Runtime) error { - if rt.valid { - return define.ErrRuntimeFinalized - } - - rt.config.Engine.InfraImage = name - - return nil - } -} - // WithRenumber instructs libpod to perform a lock renumbering while // initializing. This will handle migrations from early versions of libpod with // file locks to newer versions with SHM locking, as well as changes in the |