executor

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd string

type DebugExecutor

type DebugExecutor struct {
	User         string
	Password     string
	IdentityFile string
}

func NewDebugExecutor

func NewDebugExecutor(user, password, keyPath string) *DebugExecutor

func (*DebugExecutor) Close

func (d *DebugExecutor) Close()

func (*DebugExecutor) Execute

func (d *DebugExecutor) Execute(address, cmd string) (string, error)

func (*DebugExecutor) Transfer

func (d *DebugExecutor) Transfer(address, localPath, remotePath string) error

type ExecuteCtx

type ExecuteCtx struct {
	Target string
	Cmd    string
}

type Executor

type Executor interface {
	Execute(target, cmd string) (string, error)
	Transfer(target, localPath, remotePath string) error
	Close()
}

type Position

type Position struct {
	LocalDir  string
	RemoteDir string
	Opts      string
}

type SSHExecutor

type SSHExecutor struct {
	User         string
	Password     string
	IdentityFile string
	// contains filtered or unexported fields
}

func NewSSHExecutor

func NewSSHExecutor(user, password, keyPath string) *SSHExecutor

func (*SSHExecutor) Close

func (s *SSHExecutor) Close()

func (*SSHExecutor) Download

func (s *SSHExecutor) Download(localPath, remotePath string) error

func (*SSHExecutor) Execute

func (s *SSHExecutor) Execute(address, cmd string) (string, error)

func (*SSHExecutor) Transfer

func (s *SSHExecutor) Transfer(address, localPath, remotePath string) error

type TransferCtx

type TransferCtx struct {
	Target   string
	Position []Position
}

Jump to

Keyboard shortcuts

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