Documentation
¶
Overview ¶
Package ssh is a transport.Interface implementation, which forwards given addresses over specified SSH host.
Index ¶
Constants ¶
View Source
const ( // User is a default user used for SSH connections. User = "root" // ConnectionTimeout is a default time SSH will wait while connecting to unreachable server. ConnectionTimeout = "30s" // RetryTimeout is a default time after we give up connecting to reachable server. RetryTimeout = "60s" // RetryInterval is a default time how long we wait between SSH connection attempts. RetryInterval = "1s" // Port is a default port used for SSH connections. Port = 22 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string `json:"address,omitempty"`
Port int `json:"port,omitempty"`
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
ConnectionTimeout string `json:"connectionTimeout,omitempty"`
RetryTimeout string `json:"retryTimeout,omitempty"`
RetryInterval string `json:"retryInterval,omitempty"`
PrivateKey string `json:"privateKey,omitempty"`
}
Config represents SSH transport configuration
func BuildConfig ¶
BuildConfig takes destination SSH configuration, struct with default values provided by the user and merges it together with global SSH default values.
Click to show internal directories.
Click to hide internal directories.