transport

package
v0.0.0-...-d5fbc43 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Close() error
	Exec(context.Context, bool, ExecCallbackFunc) error
	GetAddress() string
	GetHost() string
	// TODO: Redesign this to avoid mutating state
	SetError(error)
}

func NewConnection

func NewConnection(server *inventory.Server, timeout time.Duration) (Connection, error)

type ExecCallbackFunc

type ExecCallbackFunc func(*Session) (error, *errgroup.Group)

type Session

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

Session is a wrapper around ssh.Session

func (*Session) CloseStdin

func (s *Session) CloseStdin() error

CloseStdin closes the stdin pipe of the remote process

func (*Session) Start

func (s *Session) Start(cmd string) error

Start starts a remote process in the current session

func (*Session) Stdin

func (s *Session) Stdin() io.Writer

Stdin returns a pipe to the stdin of the remote process

Jump to

Keyboard shortcuts

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