Documentation
¶
Overview ¶
Package tunnel manages SSH local port forwarding for database connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool
Host string
Port int
User string
Password string
PrivateKey string
KnownHosts string
KeepAliveInterval time.Duration
Reconnect bool
ReconnectAttempts int
JumpHost string
JumpPort int
JumpUser string
JumpPassword string
JumpPrivateKey string
JumpKnownHosts string
RemoteHost string
RemotePort int
}
Config describes the SSH endpoint, authentication material, and remote database endpoint used to create a local tunnel.
type Tunnel ¶
type Tunnel struct {
// contains filtered or unexported fields
}
Tunnel represents an active local TCP listener backed by an SSH client.
func Start ¶
Start opens an SSH tunnel when cfg.Enabled is true. Disabled tunnels return nil without error so callers can handle optional tunneling uniformly.
Click to show internal directories.
Click to hide internal directories.