Documentation
¶
Overview ¶
Package remote implements SSH-based remote command execution for node workflows.
Index ¶
Constants ¶
const DefaultBootstrapURL = "https://omnitruck.cinc.sh/install.sh"
Variables ¶
This section is empty.
Functions ¶
func BootstrapCommand ¶
func BootstrapCommand(opts BootstrapOptions) (string, error)
BootstrapCommand builds the shell command executed on the target.
Types ¶
type BootstrapOptions ¶
type BootstrapOptions struct {
NodeName string
ServerURL string
ClientKeyPEM string
RunList []string
Environment string
PolicyName string
PolicyGroup string
Sudo bool
BootstrapURL string
BootstrapVersion string
}
BootstrapOptions describes the remote Cinc Client bootstrap script.
type CommandResult ¶
type CommandResult struct {
Host string `json:"host"`
Stdout string `json:"stdout,omitempty"`
Stderr string `json:"stderr,omitempty"`
ExitCode int `json:"exit_code"`
Error string `json:"error,omitempty"`
}
CommandResult is the result of one command on one host.
type NativeRunner ¶
type NativeRunner struct{}
NativeRunner is a Runner backed by golang.org/x/crypto/ssh.
func (NativeRunner) Run ¶
func (NativeRunner) Run(ctx context.Context, target Target, command string, opts SSHOptions) CommandResult
Run executes command on target through SSH.
type Runner ¶
type Runner interface {
Run(ctx context.Context, target Target, command string, opts SSHOptions) CommandResult
}
Runner executes a command on a target.