From d9cdfd28877f094c5dfe5925041450f3a092e09c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 19 Sep 2025 17:06:04 +0200 Subject: [PATCH] client: remove unused Client.HTTPClient() method This method was introduced in [moby@5a84124] related to the (now removed) support for "compose on kubernetes" in the CLI. This functionality extended the CLI with endpoints that are not part of the engine API, but re-using the HTTP-client with the same (TLS) config as the CLI itself. While such scenarios may be something to consider in future (i.e. more easily extend the API with custom endpoints), this method is not currently used, but defined as part of the CLI's interface. This patch removes the method for now, so that we can design from a clean slate in case we need this extensibility, instead of keeping methods that were added ad-hoc around. [moby@5a84124]: https://github.com/moby/moby/commit/5a84124739a809bcdb5830fd385440027ddd910f Signed-off-by: Sebastiaan van Stijn --- client/client.go | 6 ------ client/client_interfaces.go | 2 -- vendor/github.com/moby/moby/client/client.go | 6 ------ vendor/github.com/moby/moby/client/client_interfaces.go | 2 -- 4 files changed, 16 deletions(-) diff --git a/client/client.go b/client/client.go index e23917eae1..61b8a24a7f 100644 --- a/client/client.go +++ b/client/client.go @@ -381,12 +381,6 @@ func (cli *Client) DaemonHost() string { return cli.host } -// HTTPClient returns a copy of the HTTP client bound to the server -func (cli *Client) HTTPClient() *http.Client { - c := *cli.client - return &c -} - // ParseHostURL parses a url string, validates the string is a host url, and // returns the parsed URL func ParseHostURL(host string) (*url.URL, error) { diff --git a/client/client_interfaces.go b/client/client_interfaces.go index ae6e529cc8..2f2fd3ce3d 100644 --- a/client/client_interfaces.go +++ b/client/client_interfaces.go @@ -4,7 +4,6 @@ import ( "context" "io" "net" - "net/http" "github.com/moby/moby/api/types" "github.com/moby/moby/api/types/build" @@ -38,7 +37,6 @@ type stableAPIClient interface { VolumeAPIClient ClientVersion() string DaemonHost() string - HTTPClient() *http.Client ServerVersion(ctx context.Context) (types.Version, error) NegotiateAPIVersion(ctx context.Context) NegotiateAPIVersionPing(types.Ping) diff --git a/vendor/github.com/moby/moby/client/client.go b/vendor/github.com/moby/moby/client/client.go index e23917eae1..61b8a24a7f 100644 --- a/vendor/github.com/moby/moby/client/client.go +++ b/vendor/github.com/moby/moby/client/client.go @@ -381,12 +381,6 @@ func (cli *Client) DaemonHost() string { return cli.host } -// HTTPClient returns a copy of the HTTP client bound to the server -func (cli *Client) HTTPClient() *http.Client { - c := *cli.client - return &c -} - // ParseHostURL parses a url string, validates the string is a host url, and // returns the parsed URL func ParseHostURL(host string) (*url.URL, error) { diff --git a/vendor/github.com/moby/moby/client/client_interfaces.go b/vendor/github.com/moby/moby/client/client_interfaces.go index ae6e529cc8..2f2fd3ce3d 100644 --- a/vendor/github.com/moby/moby/client/client_interfaces.go +++ b/vendor/github.com/moby/moby/client/client_interfaces.go @@ -4,7 +4,6 @@ import ( "context" "io" "net" - "net/http" "github.com/moby/moby/api/types" "github.com/moby/moby/api/types/build" @@ -38,7 +37,6 @@ type stableAPIClient interface { VolumeAPIClient ClientVersion() string DaemonHost() string - HTTPClient() *http.Client ServerVersion(ctx context.Context) (types.Version, error) NegotiateAPIVersion(ctx context.Context) NegotiateAPIVersionPing(types.Ping)