ssh

package
v0.0.0-...-a5e26f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandOutput

type CommandOutput struct {
	StdOut []byte
	StdErr []byte
}

CommandOutput contains the STDIO output from running a command

type ExecuteCommand

type ExecuteCommand interface {
	Execute(command string) (CommandOutput, error)
	ExecuteOutput(command string, stream bool) (CommandOutput, error)
}

ExecuteCommand executes a command on a remote machine to install k3s

type SSHClient

type SSHClient struct {
	// contains filtered or unexported fields
}

SSHClient initializes a ssh client connection

func ConfigureSSHClient

func ConfigureSSHClient(region string) (*SSHClient, error)

ConfigureSSHClient configures a ssh client with a user, host, and ssh keys

func NewSSHClient

func NewSSHClient(host string, config *ssh.ClientConfig) (*SSHClient, error)

NewSSHClient creates a new ssh client connection with the provdided host and configuration

func (SSHClient) Close

func (s SSHClient) Close() error

func (SSHClient) Execute

func (s SSHClient) Execute(command string) (CommandOutput, error)

func (SSHClient) ExecuteOutput

func (s SSHClient) ExecuteOutput(command string, stream bool) (CommandOutput, error)

ExecuteOutput pipes the remote command output to local stdio

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL