Documentation ¶
Index ¶
- type Connection
- func (c Connection) Run(cmd string) (stdout, stderr []byte, exitCode int, err error)
- func (c Connection) Stream(cmd string, stdoutWriter io.Writer) (stderr []byte, exitCode int, err error)
- func (c Connection) StreamStdin(cmd string, stdinReader io.Reader) (stdout, stderr []byte, exitCode int, err error)
- func (c Connection) Username() string
- type Logger
- type SSHConnection
- type SSHConnectionFactory
- type SSHOptsGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (Connection) Run ¶
func (c Connection) Run(cmd string) (stdout, stderr []byte, exitCode int, err error)
func (Connection) StreamStdin ¶
func (Connection) Username ¶
func (c Connection) Username() string
type SSHConnection ¶
type SSHConnection interface { Stream(cmd string, writer io.Writer) ([]byte, int, error) StreamStdin(cmd string, reader io.Reader) ([]byte, []byte, int, error) Run(cmd string) ([]byte, []byte, int, error) Username() string }
func NewConnection ¶
func NewConnection(hostName, userName, privateKey string, publicKeyCallback ssh.HostKeyCallback, publicKeyAlgorithm []string, logger Logger) (SSHConnection, error)
func NewConnectionWithServerAliveInterval ¶
func NewConnectionWithServerAliveInterval(hostName, userName, privateKey string, publicKeyCallback ssh.HostKeyCallback, publicKeyAlgorithm []string, serverAliveInterval time.Duration, logger Logger) (SSHConnection, error)
type SSHConnectionFactory ¶
type SSHConnectionFactory func(host, user, privateKey string, publicKeyCallback ssh.HostKeyCallback, publicKeyAlgorithm []string, logger Logger) (SSHConnection, error)
Click to show internal directories.
Click to hide internal directories.