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:
Sebastiaan van Stijn 2025-03-01 02:45:42 +01:00
parent 08f86507b4
commit 5ea072d936
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 0 additions and 28 deletions

View File

@ -56,7 +56,6 @@ type Cli interface {
CurrentContext() string
DockerEndpoint() docker.Endpoint
TelemetryClient
DeprecatedManifestClient
}
// DockerCli is an instance the docker command line client.

View File

@ -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)
}