cli/command: remove deprecated RegistryClient from CLI interface
This method was a shallow wrapper around registryclient.NewRegistryClient but due to its signature resulted in various dependencies becoming a dependency of the "command" package. Consequence of this was that cli-plugins, which need the cli/command package, would also get those dependencies. It is no longer used, and was deprecated in 8ad07217dc92fa81806d4eb64a4eb04cf5c99b15. This patch removes the RegistryClient method from the interface Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
08f86507b4
commit
5ea072d936
@ -56,7 +56,6 @@ type Cli interface {
|
|||||||
CurrentContext() string
|
CurrentContext() string
|
||||||
DockerEndpoint() docker.Endpoint
|
DockerEndpoint() docker.Endpoint
|
||||||
TelemetryClient
|
TelemetryClient
|
||||||
DeprecatedManifestClient
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DockerCli is an instance the docker command line client.
|
// DockerCli is an instance the docker command line client.
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
package command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
registryclient "github.com/docker/cli/cli/registry/client"
|
|
||||||
"github.com/docker/docker/api/types/registry"
|
|
||||||
)
|
|
||||||
|
|
||||||
type DeprecatedManifestClient interface {
|
|
||||||
// RegistryClient returns a client for communicating with a Docker distribution
|
|
||||||
// registry.
|
|
||||||
//
|
|
||||||
// Deprecated: use [registryclient.NewRegistryClient]. This method is no longer used and will be removed in the next release.
|
|
||||||
RegistryClient(bool) registryclient.RegistryClient
|
|
||||||
}
|
|
||||||
|
|
||||||
// RegistryClient returns a client for communicating with a Docker distribution
|
|
||||||
// registry
|
|
||||||
//
|
|
||||||
// Deprecated: use [registryclient.NewRegistryClient]. This method is no longer used and will be removed in the next release.
|
|
||||||
func (cli *DockerCli) RegistryClient(allowInsecure bool) registryclient.RegistryClient {
|
|
||||||
resolver := func(ctx context.Context, index *registry.IndexInfo) registry.AuthConfig {
|
|
||||||
return ResolveAuthConfig(cli.ConfigFile(), index)
|
|
||||||
}
|
|
||||||
return registryclient.NewRegistryClient(resolver, UserAgent(), allowInsecure)
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user