mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: separate Dialer() implementation from public API
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -449,6 +449,10 @@ func (cli *Client) dialerFromTransport() func(context.Context, string, string) (
|
||||
//
|
||||
// ["docker dial-stdio"]: https://github.com/docker/cli/pull/1014
|
||||
func (cli *Client) Dialer() func(context.Context) (net.Conn, error) {
|
||||
return cli.dialer()
|
||||
}
|
||||
|
||||
func (cli *Client) dialer() func(context.Context) (net.Conn, error) {
|
||||
return func(ctx context.Context) (net.Conn, error) {
|
||||
if dialFn := cli.dialerFromTransport(); dialFn != nil {
|
||||
return dialFn(ctx, cli.proto, cli.addr)
|
||||
|
||||
Reference in New Issue
Block a user