remote

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 10 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 struct {
	// The remote server's hostname connected to.
	Server string

	// The SSH client handler to use.
	Handler handlers.Handler
	// DTail commands sent from client to server. When client loses
	// connection to the server it re-connects automatically and sends the
	// same commands again.
	Commands []string
	// contains filtered or unexported fields
}

Connection represents a client connection connection to a single server.

func NewConnection

func NewConnection(server string, userName string, authMethods []ssh.AuthMethod, hostKeyCallback *client.HostKeyCallback) *Connection

NewConnection returns a new connection.

func NewOneOffConnection

func NewOneOffConnection(server string, userName string, authMethods []ssh.AuthMethod) *Connection

NewOneOffConnection creates new one-off connection (only for sending a series of commands and then quit).

func (*Connection) Start

func (c *Connection) Start(throttleCh, statsCh chan struct{})

Start the server connection. Build up SSH session and send some DTail commandc.

func (*Connection) Stop

func (c *Connection) Stop()

Stop the connection.

Jump to

Keyboard shortcuts

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