Documentation
¶
Index ¶
- Constants
- type RebootChecker
- type RebootCheckerI
- type RebootWaiter
- type RemoteManager
- type WinRM
- func (w *WinRM) CanLoginVM() error
- func (w *WinRM) CanReachVM() error
- func (w *WinRM) ExecuteCommand(command string) (int, error)
- func (w *WinRM) ExecuteCommandWithTimeout(command string, timeout time.Duration) (int, error)
- func (w *WinRM) ExtractArchive(source, destination string) error
- func (w *WinRM) UploadArtifact(sourceFilePath, destinationFilePath string) error
- type WinRMClient
- type WinRMClientFactory
- type WinRMClientFactoryI
Constants ¶
View Source
const PowershellExecutionErrorMessage = "powershell encountered an issue"
View Source
const WinRmPort = 5985
View Source
const WinRmTimeout = 120 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RebootChecker ¶
type RebootChecker struct {
// contains filtered or unexported fields
}
func NewRebootChecker ¶
func NewRebootChecker(winrmRemoteManager RemoteManager) *RebootChecker
func (*RebootChecker) RebootHasFinished ¶
func (rc *RebootChecker) RebootHasFinished() (bool, error)
RebootHasFinished inspired by Hashicorp Packer waitForRestart
type RebootCheckerI ¶
type RebootWaiter ¶
type RebootWaiter struct {
// contains filtered or unexported fields
}
func NewRebootWaiter ¶
func NewRebootWaiter(poller poller.PollerI, rebootChecker RebootCheckerI) *RebootWaiter
func (*RebootWaiter) WaitForRebootFinished ¶
func (rw *RebootWaiter) WaitForRebootFinished() error
type RemoteManager ¶
type RemoteManager interface { UploadArtifact(source, destination string) error ExtractArchive(source, destination string) error ExecuteCommand(command string) (int, error) ExecuteCommandWithTimeout(command string, timeout time.Duration) (int, error) CanReachVM() error CanLoginVM() error }
func NewWinRM ¶
func NewWinRM(host string, username string, password string, clientFactory WinRMClientFactoryI) RemoteManager
type WinRM ¶
type WinRM struct {
// contains filtered or unexported fields
}
func (*WinRM) CanLoginVM ¶
func (*WinRM) CanReachVM ¶
func (*WinRM) ExecuteCommandWithTimeout ¶
func (*WinRM) ExtractArchive ¶
func (*WinRM) UploadArtifact ¶
type WinRMClient ¶
type WinRMClientFactory ¶
type WinRMClientFactory struct {
// contains filtered or unexported fields
}
func NewWinRmClientFactory ¶
func NewWinRmClientFactory(host, username, password string) *WinRMClientFactory
func (*WinRMClientFactory) Build ¶
func (f *WinRMClientFactory) Build(timeout time.Duration) (WinRMClient, error)
type WinRMClientFactoryI ¶
type WinRMClientFactoryI interface {
Build(timeout time.Duration) (WinRMClient, error)
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.