ssh

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

type System struct {
	// contains filtered or unexported fields
}

func NewSystem

func NewSystem(sshClient *sshclient.Client, opts ...SystemOption) (*System, error)

func (*System) Close

func (s *System) Close() error

Close closes the underlying ssh client

func (*System) Create

func (s *System) Create(ctx context.Context, fileInfo fs.FileInfo) (system.WriteFile, error)

func (*System) Execute

func (s *System) Execute(ctx context.Context, c cmd.Command) (cmd.Result, error)

func (*System) Open

func (s *System) Open(ctx context.Context, name string) (fs.File, error)

Open returns a fs.File Open fetches fs.FileInfo immediately when invoked

func (*System) Stat

func (s *System) Stat(ctx context.Context, name string) (fs.FileInfo, error)

type SystemOption

type SystemOption func(*System) error

func CommandMiddleware

func CommandMiddleware(m cmd.Middleware) SystemOption

func Sessions

func Sessions(c int) SystemOption

Sessions is a SystemOption which defines the maximum number of concurrent ssh sessions to the remote Set Sessions to 0 to not limit the number of concurrent ssh sessions.

Jump to

Keyboard shortcuts

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