Documentation ¶
Overview ¶
The SSHOperator struct executes commands on a remote machine over an SSH session.
Index ¶
- type Command
- type CommandOperator
- type CommandRes
- type SSHOperator
- func (s *SSHOperator) AddClient(address string, config *ssh.ClientConfig) (*SSHOperator, error)
- func (s *SSHOperator) Close() error
- func (s *SSHOperator) CopyFile(ctx context.Context, source string, dest string) error
- func (s *SSHOperator) Execute(command Command) (CommandRes, error)
- func (s *SSHOperator) ExecuteStdout(command Command, stream bool) (CommandRes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandOperator ¶
type CommandOperator interface { Execute(command string) (CommandRes, error) ExecuteStdout(command string, stream bool) (CommandRes, error) }
CommandOperator executes a command on a machine to install k3sup
type CommandRes ¶
CommandRes contains the STDIO output from running a command
type SSHOperator ¶
SSHOperator executes commands on a remote machine over an SSH session
func NewSSHOperator ¶
func NewSSHOperator() *SSHOperator
func (*SSHOperator) AddClient ¶
func (s *SSHOperator) AddClient(address string, config *ssh.ClientConfig) (*SSHOperator, error)
func (*SSHOperator) Close ¶
func (s *SSHOperator) Close() error
func (*SSHOperator) Execute ¶
func (s *SSHOperator) Execute(command Command) (CommandRes, error)
func (*SSHOperator) ExecuteStdout ¶
func (s *SSHOperator) ExecuteStdout(command Command, stream bool) (CommandRes, error)
Click to show internal directories.
Click to hide internal directories.