sshtask

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

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

Task is a ssh task for one or more hosts.

func NewTask

func NewTask(taskType TaskType, configFlags *configflags.ConfigFlags) *Task

NewTask create a new task.

func (*Task) CheckErr added in v1.6.0

func (t *Task) CheckErr() error

func (*Task) ListHosts added in v1.8.0

func (t *Task) ListHosts() ([]string, error)

func (*Task) SSH added in v1.15.0

func (t *Task) SSH(host *batchssh.Host) (string, error)

SSH implements batchssh.Tasker.

func (*Task) SetCommand

func (t *Task) SetCommand(command string)

func (*Task) SetFetchFiles added in v1.4.0

func (t *Task) SetFetchFiles(files []string)

func (*Task) SetFetchOptions added in v1.4.1

func (t *Task) SetFetchOptions(destPath, tmpDir string, enableZipFiles bool)

func (*Task) SetPushOptions added in v1.4.1

func (t *Task) SetPushOptions(destPath string, allowOverwrite, enableZip bool)

func (*Task) SetPushfiles added in v1.4.0

func (t *Task) SetPushfiles(files, zipFiles []string)

func (*Task) SetScriptFile added in v0.6.1

func (t *Task) SetScriptFile(sciptFile string)

func (*Task) SetScriptOptions added in v0.5.0

func (t *Task) SetScriptOptions(destPath string, remove, allowOverwrite bool)

func (*Task) SetTargetHosts added in v1.5.0

func (t *Task) SetTargetHosts(hosts []string)

func (*Task) Start

func (t *Task) Start()

Start to run ssh task.

type TaskType

type TaskType int
const (
	CommandTask TaskType = iota
	ScriptTask
	PushTask
	FetchTask
)

Jump to

Keyboard shortcuts

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