ssh

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Run runs a command over the SSH connection.
	Run(bool, string) error

	// CombinedOutput runs a command over the SSH connection, returning the combined
	// stdin and stdout.
	CombinedOutput(string) ([]byte, error)

	// Close closes the SSH connection.
	Close() error

	// Shell creates a login shell.
	Shell() error
}

Client is an SSH client used for `quilt` commands.

func New

func New(host string, keyPath string) (Client, error)

New returns an SSH Client connected to the given host.

type Getter

type Getter func(string, string) (Client, error)

Getter is used to retrieve a Client.

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func (*MockClient) Close

func (_m *MockClient) Close() error

Close provides a mock function with given fields:

func (*MockClient) CombinedOutput

func (_m *MockClient) CombinedOutput(_a0 string) ([]byte, error)

CombinedOutput provides a mock function with given fields: _a0

func (*MockClient) Run

func (_m *MockClient) Run(_a0 bool, _a1 string) error

Run provides a mock function with given fields: _a0, _a1

func (*MockClient) Shell

func (_m *MockClient) Shell() error

Shell provides a mock function with given fields:

type NativeClient

type NativeClient struct {
	*ssh.Client
}

NativeClient is wrapper over Go's SSH client.

func (NativeClient) CombinedOutput

func (c NativeClient) CombinedOutput(command string) ([]byte, error)

CombinedOutput runs an SSH command, returning the combined stdin and stdout.

func (NativeClient) Run

func (c NativeClient) Run(requestPTY bool, command string) error

Run runs an SSH command.

func (NativeClient) Shell

func (c NativeClient) Shell() error

Shell starts a login shell.

Jump to

Keyboard shortcuts

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