Documentation
¶
Index ¶
Constants ¶
View Source
const Name = "system/exec"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Input string `json:"input,omitempty"` // The command that was executed
Output string `json:"output,omitempty"` // Standard output from the command
Stderr string `json:"stderr,omitempty"` // Standard error from the command
Status int `json:"status,omitempty"` // Exit code of the command
}
Command represents the result of executing a single command
type Input ¶
type Input struct {
Host *system.Host `json:"host,omitempty" description:"host to execute command on" internal:"true" ` //host to execute command on
Directory string `` //directory where command should run
/* 126-byte string literal not displayed */
Env map[string]string `json:"env,omitempty" description:"environment variables to be set before command runs" ` //environment variables to be set before command runs
Commands []string `json:"commands,omitempty" description:"commands to execute on the target system"` //commands to run
TimeoutMs int `json:"timeoutMs,omitempty" yaml:"timeoutMs,omitempty" description:"max wiat time before timing out command"`
AbortOnError *bool `json:"abortOnError,omitempty" description:"check after command execution if status is <> 0, then throws error" ` //whether to abort on error
}
Input represents system executor configuration
type Output ¶
type Output struct {
Commands []*Command `json:"commands,omitempty"` // Results of individual commands
Stdout string `json:"stdout,omitempty"` // Combined standard output from all commands
Stderr string `json:"stderr,omitempty"` // Combined standard error from all commands
Status int `json:"status,omitempty"` // Exit code of the last command executed
}
Output represents the results of executing commands
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct for executing terminal commands
func (*Service) Method ¶
func (s *Service) Method(name string) (types.Executable, error)
Method returns method by Name
func (*Service) Methods ¶
func (s *Service) Methods() types.Signatures
Click to show internal directories.
Click to hide internal directories.