ssh

package
v0.0.0-...-850ae45 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcreteWindowResizer

type ConcreteWindowResizer struct {
	DoneChannel chan bool
}

func (*ConcreteWindowResizer) StartResizing

func (w *ConcreteWindowResizer) StartResizing(session *ssh.Session)

func (*ConcreteWindowResizer) StopResizing

func (w *ConcreteWindowResizer) StopResizing()

type SSH

type SSH struct {
	Terminal      Terminal
	WindowResizer WindowResizer
}

func (*SSH) GenerateAddress

func (*SSH) GenerateAddress() (host string, port string, err error)

func (*SSH) GenerateKeypair

func (s *SSH) GenerateKeypair() ([]byte, []byte, error)

func (*SSH) GetSSHOutput

func (s *SSH) GetSSHOutput(command string, addresses []SSHAddress, privateKey []byte, timeout time.Duration) (string, error)

func (*SSH) RunSSHCommand

func (s *SSH) RunSSHCommand(command string, addresses []SSHAddress, privateKey []byte, timeout time.Duration, stdout io.Writer, stderr io.Writer) (err error)

func (*SSH) StartSSHSession

func (s *SSH) StartSSHSession(addresses []SSHAddress, privateKey []byte, timeout time.Duration, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

func (*SSH) WaitForSSH

func (s *SSH) WaitForSSH(addresses []SSHAddress, privateKey []byte, timeout time.Duration) error

func (*SSH) WithSSHTunnel

func (s *SSH) WithSSHTunnel(remoteAddress string, sshAddresses []SSHAddress, privateKey []byte, timeout time.Duration, block func(forwardingAddress string)) error

type SSHAddress

type SSHAddress struct {
	IP   string
	Port string
}

type Terminal

type Terminal interface {
	SetRawTerminal(fd uintptr) (*term.State, error)
	RestoreTerminal(fd uintptr, state *term.State) error
	GetFdInfo(in interface{}) uintptr
	GetWinSize(fd uintptr) (*term.Winsize, error)
}

type TerminalWrapper

type TerminalWrapper struct{}

func (*TerminalWrapper) GetFdInfo

func (*TerminalWrapper) GetFdInfo(in interface{}) uintptr

func (*TerminalWrapper) GetWinSize

func (*TerminalWrapper) GetWinSize(fd uintptr) (*term.Winsize, error)

func (*TerminalWrapper) RestoreTerminal

func (*TerminalWrapper) RestoreTerminal(fd uintptr, state *term.State) error

func (*TerminalWrapper) SetRawTerminal

func (*TerminalWrapper) SetRawTerminal(fd uintptr) (*term.State, error)

type WindowResizer

type WindowResizer interface {
	StartResizing(session *ssh.Session)
	StopResizing()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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