mirror of
https://github.com/containers/podman.git
synced 2025-09-23 05:04:43 +08:00
Remove unused registry related options from libpod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #349 Approved by: rhatdan
This commit is contained in:
@ -45,10 +45,8 @@ func WithStorageConfig(config storage.StoreOptions) RuntimeOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithImageConfig uses the given configuration to set up image handling
|
// WithDefaultTransport sets the default transport for retrieving images
|
||||||
// If this is not specified, the system default configuration will be used
|
func WithDefaultTransport(defaultTransport string) RuntimeOption {
|
||||||
// instead
|
|
||||||
func WithImageConfig(defaultTransport string, insecureRegistries, registries []string) RuntimeOption {
|
|
||||||
return func(rt *Runtime) error {
|
return func(rt *Runtime) error {
|
||||||
if rt.valid {
|
if rt.valid {
|
||||||
return ErrRuntimeFinalized
|
return ErrRuntimeFinalized
|
||||||
@ -56,12 +54,6 @@ func WithImageConfig(defaultTransport string, insecureRegistries, registries []s
|
|||||||
|
|
||||||
rt.config.ImageDefaultTransport = defaultTransport
|
rt.config.ImageDefaultTransport = defaultTransport
|
||||||
|
|
||||||
rt.config.InsecureRegistries = make([]string, len(insecureRegistries))
|
|
||||||
copy(rt.config.InsecureRegistries, insecureRegistries)
|
|
||||||
|
|
||||||
rt.config.Registries = make([]string, len(registries))
|
|
||||||
copy(rt.config.Registries, registries)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,8 +58,6 @@ type Runtime struct {
|
|||||||
type RuntimeConfig struct {
|
type RuntimeConfig struct {
|
||||||
StorageConfig storage.StoreOptions
|
StorageConfig storage.StoreOptions
|
||||||
ImageDefaultTransport string
|
ImageDefaultTransport string
|
||||||
InsecureRegistries []string
|
|
||||||
Registries []string
|
|
||||||
SignaturePolicyPath string
|
SignaturePolicyPath string
|
||||||
StateType RuntimeStateStore
|
StateType RuntimeStateStore
|
||||||
RuntimePath string
|
RuntimePath string
|
||||||
|
Reference in New Issue
Block a user