ssh

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDialer

type AppDialer struct{}

func (*AppDialer) Dial

func (*AppDialer) Dial(appName string, instanceIndex int, config *config_package.Config) (Client, error)

type ChannelListener

type ChannelListener struct{}

func (*ChannelListener) Listen

func (*ChannelListener) Listen(network, laddr string) (<-chan io.ReadWriteCloser, <-chan error)

type Client

type Client interface {
	Open(width, height int, desirePTY bool) (*sshapi.Session, error)
	Forward(localConn io.ReadWriteCloser, remoteAddress string) error
}

type ClientDialer

type ClientDialer interface {
	Dial(appName string, instanceIndex int, config *config_package.Config) (Client, error)
}

type Listener

type Listener interface {
	Listen(network, laddr string) (<-chan io.ReadWriteCloser, <-chan error)
}

type SSH

type SSH struct {
	Listener        Listener
	ClientDialer    ClientDialer
	Term            Term
	SessionFactory  SessionFactory
	SigWinchChannel chan os.Signal
	ExitHandler     exit_handler.ExitHandler
	// contains filtered or unexported fields
}

func New

func New(exitHandler exit_handler.ExitHandler) *SSH

func (*SSH) Connect

func (s *SSH) Connect(appName string, instanceIndex int, config *config_package.Config) error

func (*SSH) Forward

func (s *SSH) Forward(localAddress, remoteAddress string) error

func (*SSH) Shell

func (s *SSH) Shell(command string, desirePTY bool) error

type SSHAPISessionFactory

type SSHAPISessionFactory struct{}

func (*SSHAPISessionFactory) New

func (*SSHAPISessionFactory) New(client Client, width, height int, desirePTY bool) (Session, error)

type Session

type Session interface {
	KeepAlive() (stopChan chan<- struct{})
	Resize(width, height int) error
	Shell() error
	Run(string) error
	Wait() error
	Close() error
}

type SessionFactory

type SessionFactory interface {
	New(client Client, width, height int, desirePTY bool) (Session, error)
}

type Term

type Term interface {
	SetRawTerminal(fd uintptr) (*term.State, error)
	RestoreTerminal(fd uintptr, state *term.State) error
	GetWinsize(fd uintptr) (width int, height int)
	IsTTY(fd uintptr) bool
}

Directories

Path Synopsis
mocks
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 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 This file was generated by counterfeiter This file was generated by counterfeiter
mocks
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