host

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute func(Host) error

func Address

func Address(addr string) Attribute

func Auth

func Auth(a *auth.Auth) Attribute

func Key

func Key(username string, passphrase string, key io.Reader) Attribute

func Password

func Password(username, password string) Attribute

func Port

func Port(port uint16) Attribute

func PublicKey

func PublicKey(key io.Reader) Attribute

func Timeout

func Timeout(ttl time.Duration) Attribute

type Host

type Host interface {
	Clone(attributes ...Attribute) (Host, error)
	Command(ctx context.Context, name string, options ...command.Option) (*command.Command, error)
	Fs(ctx context.Context, opts ...sftp.ClientOption) (afero.Fs, error)
	String() string
}

func New

func New(attributes ...Attribute) (Host, error)

Jump to

Keyboard shortcuts

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