Documentation

Overview

    Package runner provides the Inertia client's low-level SSH command runner

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type SSHOptions

    type SSHOptions struct {
    	KeyPassphrase string
    }

      SSHOptions denotes options for the SSH runner

      type SSHRunner

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

        SSHRunner runs commands over SSH and captures results.

        func NewSSHRunner

        func NewSSHRunner(ip string, cfg *cfg.SSH, opts SSHOptions) *SSHRunner

          NewSSHRunner returns a new SSHRunner

          func (*SSHRunner) CopyFile

          func (r *SSHRunner) CopyFile(file io.Reader, remotePath string, permissions string) error

            CopyFile copies given reader to remote

            func (*SSHRunner) Run

            func (r *SSHRunner) Run(cmd string) (cmdout *bytes.Buffer, cmderr *bytes.Buffer, err error)

              Run runs a command remotely.

              func (*SSHRunner) RunSession

              func (r *SSHRunner) RunSession(commands ...string) error

                RunSession sets up a SSH shell to the remote

                func (*SSHRunner) RunStream

                func (r *SSHRunner) RunStream(cmd string, interactive bool) error

                  RunStream remotely executes given command, streaming its output and opening up an optionally interactive session

                  type SSHSession

                  type SSHSession interface {
                  	Run(cmd string) (*bytes.Buffer, *bytes.Buffer, error)
                  	RunStream(cmd string, interactive bool) error
                  	RunSession(commands ...string) error
                  	CopyFile(f io.Reader, remotePath string, permissions string) error
                  }

                    SSHSession can run remote commands over SSH

                    Source Files

                    Directories

                    Path Synopsis
                    Package mocks provides mocked implmentations of interfaces in client/runner Code generated by counterfeiter.
                    Package mocks provides mocked implmentations of interfaces in client/runner Code generated by counterfeiter.