connhelper

package
v20.10.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package connhelper provides helpers for connecting to a remote daemon host with custom logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionHelper

type ConnectionHelper struct {
	Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
	Host   string // dummy URL used for HTTP requests. e.g. "http://docker"
}

ConnectionHelper allows to connect to a remote host with custom stream provider binary.

func GetCommandConnectionHelper

func GetCommandConnectionHelper(cmd string, flags ...string) (*ConnectionHelper, error)

GetCommandConnectionHelper returns Docker-specific connection helper constructed from an arbitrary command.

func GetConnectionHelper

func GetConnectionHelper(daemonURL string) (*ConnectionHelper, error)

GetConnectionHelper returns Docker-specific connection helper for the given URL. GetConnectionHelper returns nil without error when no helper is registered for the scheme.

ssh://<user>@<host> URL requires Docker 18.09 or later on the remote host.

func GetConnectionHelperWithSSHOpts

func GetConnectionHelperWithSSHOpts(daemonURL string, sshFlags []string) (*ConnectionHelper, error)

GetConnectionHelperWithSSHOpts returns Docker-specific connection helper for the given URL, and accepts additional options for ssh connections. It returns nil without error when no helper is registered for the scheme.

Requires Docker 18.09 or later on the remote host.

Directories

Path Synopsis
Package commandconn provides a net.Conn implementation that can be used for proxying (or emulating) stream via a custom command.
Package commandconn provides a net.Conn implementation that can be used for proxying (or emulating) stream via a custom command.
Package ssh provides the connection helper for ssh:// URL.
Package ssh provides the connection helper for ssh:// URL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL