connection

package
v0.0.0-...-6ee23c0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2019 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Handles map[string]*Handle = map[string]*Handle{}

Functions

This section is empty.

Types

type Connection

type Connection struct {
	SSH *SSHConnection
}

func DecodeConnection

func DecodeConnection(s string) (*Connection, error)

func (*Connection) Encode

func (c *Connection) Encode() (encoded string, id string)

func (*Connection) Handle

func (c *Connection) Handle() *Handle

func (*Connection) Id

func (c *Connection) Id() string

type Handle

type Handle struct {
	*Connection
	// contains filtered or unexported fields
}

func NewHandle

func NewHandle(c *Connection) *Handle

func (*Handle) Connect

func (h *Handle) Connect() (*Session, error)

type SSHConnection

type SSHConnection struct {
	Host string
	User string
	Sudo bool
	Port int
}

type Session

type Session struct {
	Stdin  io.Writer
	Stdout io.Reader

	End <-chan error
	// contains filtered or unexported fields
}

func Connect

func Connect(connString string) (*Session, error)

func (*Session) Close

func (s *Session) Close() error

func (*Session) ReadFile

func (s *Session) ReadFile(fname string) ([]byte, error)

func (*Session) RemoveFile

func (s *Session) RemoveFile(fname string, force, recursive bool) error

func (*Session) WriteFile

func (s *Session) WriteFile(fname string, content []byte, mode os.FileMode) error

Jump to

Keyboard shortcuts

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