dial

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, n, addr string) (net.Conn, error)
	Dial(n, addr string) (net.Conn, error)
	Close() error
	PowerShell(ctx context.Context, opts *powershell.CreateOptions, interaction func(ctx context.Context, ps *powershell.PowerShell) error) error
	Copy(ctx context.Context, src io.Reader, dst string) (int64, error)
}

Dialer specifies a closable dialer.

func SSH

func SSH(opts SSHOptions) (Dialer, error)

DialSSH creates a dialer over SSH, which is inspired by rancher/rke tunnel.

type SSHOptions

type SSHOptions struct {
	Address           string
	Username          string
	Password          string
	KeyPEMBlockBytes  []byte
	CertPEMBlockBytes []byte
	WithAgent         bool
}

SSHOptions specifies the options to dial SSH server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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