Documentation ¶
Index ¶
- type Windows
- func (w *Windows) CopyDirectory(localDir string, remoteDir string) error
- func (w *Windows) CopyFile(filePath, remoteDir string) error
- func (w *Windows) GetCredentials() *credentials.Credentials
- func (w *Windows) GetSSHClient() error
- func (w *Windows) Reinitialize() error
- func (w *Windows) RetrieveDirectories(remoteDir string, localDir string) error
- func (w *Windows) Run(cmd string, psCmd bool) (string, error)
- type WindowsVM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Windows ¶
type Windows struct { // Credentials is used for storing the credentials for Windows VMs created Credentials *credentials.Credentials // SSHClient contains the ssh client information to access the Windows VM via ssh SSHClient *ssh.Client }
Windows represents a Windows host.
func (*Windows) CopyDirectory ¶
func (*Windows) GetCredentials ¶
func (w *Windows) GetCredentials() *credentials.Credentials
func (*Windows) GetSSHClient ¶
GetSSHClient gets the ssh client associated with Windows VM created
func (*Windows) Reinitialize ¶
func (*Windows) RetrieveDirectories ¶
RetrieveDirectories recursively copies the files and directories from the directory in the remote Windows VM to the given directory on the local host.
type WindowsVM ¶
type WindowsVM interface { // CopyDirectory copies the files from the directory on the local host to the directory on the remote Windows VM // This does not copy nested directories CopyDirectory(string, string) error // CopyFile copies the given file to the remote directory in the Windows VM. The remote directory is created if it // does not exist CopyFile(string, string) error // Run executes the given command remotely on the Windows VM over a ssh connection and returns the combined output // of stdout and stderr. If the bool is set, it implies that the cmd is to be execute in PowerShell. This function // should be used in scenarios where you want to execute a command that runs in the background. In these cases we // have observed that Run() returns before the command completes and as a result killing the process. Run(string, bool) (string, error) // GetCredentials returns the interface for accessing the VM credentials. It is up to the caller to check if non-nil // Credentials are returned before usage. GetCredentials() *credentials.Credentials // Reinitialize re-initializes the Windows VM. Presently only the ssh client is reinitialized. Reinitialize() error }
WindowsVM is the interface for interacting with a Windows object created by the cloud provider
Click to show internal directories.
Click to hide internal directories.