connector

package
v0.0.0-...-c9ef0eb Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username       string
	Password       string
	Address        string
	Port           int
	PrivateKey     string
	PrivateKeyPath string
	Timeout        time.Duration
}

type Connection

type Connection interface {
	Exec(host host.Host, cmd string) (string, int, error)
	PipeExec(host host.Host, cmd string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (code int, err error)
	Fetch(host host.Host, local, remote string) error
	Scp(host host.Host, local, remote string) error
	Close()
}

func NewConnection

func NewConnection(config Config) (Connection, error)

Jump to

Keyboard shortcuts

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