runner

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentExecOutput added in v0.6.5

type ConcurrentExecOutput struct {
	// In for confirm the Out is from which node
	In ExecInput
	// Out concurrent exec output
	Out *ExecOutput
}

ConcurrentOutput output for concurrent exec command

type ConcurrentRcpOutput added in v0.6.5

type ConcurrentRcpOutput struct {
	// In for confirm the out is from which node
	In RcpInput
	// Out concurrent rcp output
	Out *RcpOutput
}

ConcurrentRcpOutput output for concurrent rcp command

type ExecInput added in v0.6.0

type ExecInput struct {
	// ExecUser username for exec command
	ExecUser string
	// ExecHost hostname for exec command
	ExecHost string
	// Command command for exec
	Command string
	// Timeout command exec timeout
	Timeout time.Duration
}

ExecInput input format for runner interface

type ExecOutput added in v0.6.0

type ExecOutput struct {
	// Status for exec result
	Status OutputStaus
	// StdError error output for exec result
	StdError string
	// StdOutput normal output for exec result
	StdOutput string
	// ExecStart start time when exec command
	ExecStart time.Time
	// ExecEnd end time when exec command
	ExecEnd time.Time
	// Err error info about exec command
	Err error
}

ExecOutput output format for runner interface

type IRunner

type IRunner interface {
	// SyncExec exec command sync
	SyncExec(input ExecInput) *ExecOutput
	// ConcurrentExec exec command concurrency
	ConcurrentExec(input ExecInput, outputChan chan *ConcurrentExecOutput, limitChan chan int)
	// Login login to remote server
	Login(shell string) error
	// SyncPut copy file to remote server sync
	SyncPut(input RcpInput) *RcpOutput
	// SyncGet copy file from remote server sync
	SyncGet(input RcpInput) *RcpOutput
	// ConcurrentPut copy file to remote server concurrency
	ConcurrentPut(input RcpInput, outputChan chan *ConcurrentRcpOutput, limitChan chan int, pool *pb.Pool)
	// ConcurrentGet copy file from remote server concurrency
	ConcurrentGet(input RcpInput, outputChan chan *ConcurrentRcpOutput, limitChan chan int, pool *pb.Pool)
	// RemotePathSize size of remote path
	RemotePathSize(input RcpInput) (int64, error)
}

IRunner runner interface

type OutputStaus added in v0.4.0

type OutputStaus string
const (
	Fail    OutputStaus = "fail"
	Success OutputStaus = "success"
	Timeout OutputStaus = "timeout"
)

type RcpInput added in v0.6.0

type RcpInput struct {
	// LocalPath local path for file or directory
	SrcPath string
	// RemotePath remote path for file or directory
	DstPath string
	// RcpHost remote host
	RcpHost string
	// RcpUser remote user
	RcpUser string
	// RcpSize rcp file/directory size
	RcpSize int64
}

type RcpOutput added in v0.6.0

type RcpOutput struct {
	// RcpStart start time when exec command
	RcpStart time.Time
	// RcpEnd end time when exec command
	RcpEnd time.Time
	// Err error info about exec command
	Err error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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