host

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 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 Auths added in v1.1.6

func Auths(a ...*auth.Auth) Attribute

func Key

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

func Name added in v1.1.6

func Name(name string) 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 Tag added in v1.1.6

func Tag(tag string) Attribute

func Tags added in v1.1.6

func Tags(tags ...string) 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)
	Tags() []string
	String() string
	Name() string
}

func New

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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