ssh

package
v0.0.15-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Connect() error
	Close() error
	Session(ctx context.Context) (Session, error)
	Config() Config
}

func NewClient

func NewClient(ctx context.Context, options ...Option) (Client, error)

type Config

type Config interface {
	Host() string
}

type Option

type Option func(*config)

func WithHost

func WithHost(host string) Option

func WithPassword

func WithPassword(password string) Option

func WithPort

func WithPort(port int) Option

func WithPrivateKey

func WithPrivateKey(privateKey string) Option

func WithPrivateKeyPath

func WithPrivateKeyPath(privateKeyPath string) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

func WithUser

func WithUser(user string) Option

type Session

type Session interface {
	Run(ctx context.Context, cmd string) (string, error)
	Close() error
}

Jump to

Keyboard shortcuts

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