Documentation ¶
Index ¶
- Constants
- func Command(prompter, message string, remote *url.URL, command string) (*exec.Cmd, error)
- func Copy(prompter, message, local string, remote *url.URL) error
- func Output(prompter, message string, remote *url.URL, command string) ([]byte, error)
- func Run(prompter, message string, remote *url.URL, command string) error
Constants ¶
const ( PrompterEnvironmentVariable = "MUTAGEN_SSH_PROMPTER" PrompterMessageBase64EnvironmentVariable = "MUTAGEN_SSH_PROMPTER_MESSAGE_BASE64" )
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command create an SSH process set to connect to the specified remote and invoke the specified command. This function does not start the process. If a prompter and message are provided, the process will be directed to use them on startup if necessary. The command string is interpreted as literal input to the remote shell, so its contents are more flexible than just an executable name or path. The path component of the remote URL is NOT used as a working directory and is simply ignored - the command will execute in whatever default directory the server chooses.
func Copy ¶
Copy copies a local file (which MUST be an absolute path) to a remote destination. If a prompter and message are provided, this method will attempt to use them for authentication if necessary.
func Output ¶
Output creates an SSH command by forwarding its arguments to Command and then returning the results of its Output method. If there is an error creating the command, it will be returned, but otherwise the result of the Run method will be returned un-wrapped, so it can be treated as an os/exec.ExitError.
func Run ¶
Run creates an SSH command by forwarding its arguments to Command and then returning the result of its Run method. If there is an error creating the command, it will be returned, but otherwise the result of the Run method will be returned un-wrapped, so it can be treated as an os/exec.ExitError.
Types ¶
This section is empty.