sshConn

package
v0.0.0-...-c927638 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Agent

func Agent() ssh.AuthMethod

func Broker

func Broker(hostList *HostList, input <-chan string, sent chan<- bool)

func Connection

func Connection(hostname string) (connection *ssh.Client, err error)

func PublicKeyFile

func PublicKeyFile(privateKey string) ssh.AuthMethod

func Session

func Session(connection *ssh.Client, host *Host) (stdin io.WriteCloser, session *ssh.Session, err error)

Types

type Host

type Host struct {
	Color       *color.Color
	Hostname    string
	IsConnected int32
	Channel     chan string
	ControlC    chan os.Signal
	IsWaiting   int32
}

type HostList

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

func NewHostList

func NewHostList() *HostList

func (*HostList) AddHost

func (h *HostList) AddHost(host *Host)

func (*HostList) Hosts

func (h *HostList) Hosts() []*Host

func (*HostList) Len

func (h *HostList) Len() int

func (*HostList) State

func (h *HostList) State() (connected int, waiting int)

type ProxyWriter

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

func NewProxyWriter

func NewProxyWriter(file *os.File, host *Host) *ProxyWriter

func (*ProxyWriter) Write

func (w *ProxyWriter) Write(output []byte) (int, error)

Jump to

Keyboard shortcuts

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