Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandListenStream ¶
ExpandListenStream expands systemd ListenStream specifiers (%t, %i).
func ParseDockerHost ¶
ParseDockerHost extracts a unix filesystem path from DOCKER_HOST or docker context host.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps docker/docker client with helpers.
func NewFromHost ¶
NewFromHost connects to Docker at host (e.g. tcp://127.0.0.1:PORT from tunnel).
type Pair ¶
type Pair struct {
Local *Client
Remote *RemoteSession
}
Pair holds local and optional remote docker clients for a deploy session.
type RemoteSession ¶
type RemoteSession struct {
Tunnel *Tunnel
Client *Client
Socket ResolvedSocket
}
RemoteSession holds SSH tunnel and docker API client for remote host.
func OpenRemote ¶
func OpenRemote(ctx context.Context, sshClient *ssh.Client, cfg *config.Config) (*RemoteSession, error)
OpenRemote opens tunnel + docker client after resolving socket.
func TryOpenRemote ¶
func TryOpenRemote(ctx context.Context, sshClient *ssh.Client, cfg *config.Config) (*RemoteSession, error)
TryOpenRemote opens remote API session; returns nil session on failure (for optional optimization).
type ResolvedSocket ¶
ResolvedSocket holds auto-detected remote docker socket path.
func ResolveRemoteSocket ¶
ResolveRemoteSocket determines unix socket path on remote host via SSH.
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel proxies local TCP to remote unix socket over SSH streamlocal.
func StartTunnel ¶
StartTunnel listens on 127.0.0.1:0 and forwards to remote unix socket.