sshapi

package
v0.0.0-...-098adc7 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DialFunc = ssh.Dial

Functions

This section is empty.

Types

type Client

type Client struct {
	Dialer            Dialer
	SSHSessionFactory SSHSessionFactory
	Stdin             io.Reader
	Stdout            io.Writer
	Stderr            io.Writer
}

func New

func New(user, authUser, authPassword, address string) (*Client, error)

func (*Client) Forward

func (c *Client) Forward(localConn io.ReadWriteCloser, remoteAddress string) error

func (*Client) Open

func (c *Client) Open(width, height int, desirePTY bool) (*Session, error)

type CryptoSSHSessionFactory

type CryptoSSHSessionFactory struct {
	Client *ssh.Client
}

func (*CryptoSSHSessionFactory) New

type Dialer

type Dialer interface {
	Dial(n, addr string) (net.Conn, error)
}

type SSHSession

type SSHSession interface {
	StdinPipe() (io.WriteCloser, error)
	StdoutPipe() (io.Reader, error)
	StderrPipe() (io.Reader, error)
	SendRequest(name string, wantReply bool, payload []byte) (bool, error)
	RequestPty(term string, h, w int, termmodes ssh.TerminalModes) error
	// contains filtered or unexported methods
}

type SSHSessionFactory

type SSHSessionFactory interface {
	New() (SSHSession, error)
}

type Session

type Session struct {
	KeepAliveTicker *time.Ticker
	// contains filtered or unexported fields
}

func (*Session) KeepAlive

func (s *Session) KeepAlive() (stopChan chan<- struct{})

func (*Session) Resize

func (s *Session) Resize(width, height int) error

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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