client: Expose ClientHost to client users#33253
Merged
thaJeztah merged 1 commit intomoby:masterfrom May 22, 2017
Merged
Conversation
AkihiroSuda
reviewed
May 17, 2017
client/client.go
Outdated
Member
There was a problem hiding this comment.
I guess this was named for consistency with ClientVersion, but Host would be better, I think.
(Or DaemonHost? )
Member
There was a problem hiding this comment.
Yes, I had my doubts about the name as well, but couldn't come up with a good one. Host sounds good to me (or DaemonHost) :D
Contributor
There was a problem hiding this comment.
DaemonHost sounds better to me.
This commit exposes `Client.host` as `Client.DaemonHost()` This allows users of the client, a CLI for example, to query the Host that the client is attempting to contact and vary their behaviour accordingly. For example, to allow client-side configuration of HTTP proxy settings for a number of different docker hosts. Signed-off-by: Dave Tucker <[email protected]>
Contributor
Author
|
Updated to use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Added a new
ClientHost()function to theClientinterface to return the host that the client is communicating with.- How I did it
This exposes the private
hostfield that was already a part of the Client struct- How to verify it
It was verified as working in #32966
I've now re-opened this against as docker/cli#93 - this is the moby-side portion of the changes.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
