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 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" )
Click to show internal directories.
Click to hide internal directories.