runner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentOutput added in v0.4.0

type ConcurrentOutput struct {
	In  Input
	Out *Output
}

type IRunner

type IRunner interface {
	// exec command sync
	SyncExec(input Input) *Output
	// exec command concurrency
	ConcurrentExec(input Input, outputChan chan *ConcurrentOutput, limitChan chan int)
	// Login login to remote server
	Login(hostName, shell string) error
}

IRunner runner interface

type Input

type Input 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
}

Input input format for runner interface

type Output

type Output 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
}

Output output format for runner interface

type OutputStaus added in v0.4.0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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