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"`
Output string `json:"output,omitempty"`
Stderr string `json:"stderr,omitempty"`
Status int `json:"status,omitempty"`
}
Command represents the result of executing a single command
type Input ¶
type Input struct {
Host *sys.Host `json:"host,omitempty" internal:"true" description:"Target host. Use bash://localhost/ (default) or ssh://user@host:22."`
Workdir string `json:"workdir,omitempty" description:"Working directory for file operations. Example: /repo/path."`
Env map[string]string `json:"env,omitempty" description:"Environment variables (k=v) set before running. Example: {'GOFLAGS':'-mod=mod'}."`
Commands []string `json:"commands,omitempty" description:"Commands to run in order (no pipes). Example: ['rg --files', 'sed -n 1,20p file.go']."`
TimeoutMs int `json:"timeoutMs,omitempty" yaml:"timeoutMs,omitempty" description:"Per-command timeout in ms (default 180000)."`
AbortOnError *bool `json:"abortOnError,omitempty" description:"Stop on first non-zero status (default true)."`
}
Input represents system executor configuration
func (*Input) HasFSCommand ¶
type Output ¶
type Output struct {
Commands []*Command `json:"commands,omitempty"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
Status int `json:"status,omitempty"`
}
Output represents the results of executing commands
type Service ¶
type Service struct{}
Service executes terminal commands
func (*Service) Method ¶
func (s *Service) Method(name string) (svc.Executable, error)
Method resolves an executable by name.
func (*Service) Methods ¶
func (s *Service) Methods() svc.Signatures
Methods returns method signatures for this service.
Click to show internal directories.
Click to hide internal directories.