mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #33253 from dave-tucker/clientHost
client: Expose ClientHost to client users
This commit is contained in:
commit
ab2abb0d94
2 changed files with 7 additions and 0 deletions
|
@ -247,6 +247,12 @@ func (cli *Client) UpdateClientVersion(v string) {
|
|||
|
||||
}
|
||||
|
||||
// DaemonHost returns the host associated with this instance of the Client.
|
||||
// This operation doesn't acquire a mutex.
|
||||
func (cli *Client) DaemonHost() string {
|
||||
return cli.host
|
||||
}
|
||||
|
||||
// ParseHost verifies that the given host strings is valid.
|
||||
func ParseHost(host string) (string, string, string, error) {
|
||||
protoAddrParts := strings.SplitN(host, "://", 2)
|
||||
|
|
|
@ -31,6 +31,7 @@ type CommonAPIClient interface {
|
|||
SystemAPIClient
|
||||
VolumeAPIClient
|
||||
ClientVersion() string
|
||||
DaemonHost() string
|
||||
ServerVersion(ctx context.Context) (types.Version, error)
|
||||
UpdateClientVersion(v string)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue