Documentation ¶
Index ¶
- type Remote
- func (r Remote) AwaitDNS(domain string) error
- func (r Remote) AwaitNodeReady(node string) error
- func (r Remote) AwaitReady(skipAwaitReady bool) error
- func (r Remote) CAHash() (string, error)
- func (r Remote) CertKey() (string, error)
- func (r Remote) Close()
- func (r Remote) DDDisk(path string) error
- func (r Remote) DeleteDisk(path string) error
- func (r Remote) DeletePods() error
- func (r Remote) DirExists(name string) (bool, error)
- func (r Remote) DisableCronjob(namespace, resource string) error
- func (r Remote) DownloadFolder(src, dest string) error
- func (r Remote) Drain(node string, skipDrain bool) error
- func (r Remote) EnableCronjob(namespace, resource string) error
- func (r Remote) Execute(cmd string, stdIn io.Reader, stdOut, stdErr io.Writer) error
- func (r Remote) ExecuteStdin(stdIn io.Reader, stdOut, stdErr io.Writer) error
- func (r Remote) Exists(namespace, resource string) bool
- func (r Remote) FileExists(name string) (bool, error)
- func (r Remote) FilesMatch(path, otherPath string) (bool, error)
- func (r Remote) JoinToken() (string, error)
- func (r Remote) Log(f string, a ...interface{})
- func (r Remote) Md5(path string) (string, error)
- func (r Remote) MkDir(path string) error
- func (r Remote) PrepareGracefulReboot() error
- func (r Remote) Reboot() error
- func (r Remote) ReceiveFile(path string, w io.Writer) error
- func (r Remote) Remove(path string) error
- func (r Remote) RestartService(svc string) error
- func (r Remote) Run(cmd string) error
- func (r Remote) RunChanges(cmd, file string) (bool, error)
- func (r Remote) RunFetchStdout(cmd string) (string, error)
- func (r Remote) RunStdout(cmd string) error
- func (r Remote) Scale(namespace, resource string, replicas int) error
- func (r Remote) Sha256(path string) (string, error)
- func (r Remote) StopService(svc string) error
- func (r Remote) SyncDir(path string) error
- func (r Remote) SyncDisks() error
- func (r Remote) TempDir(suffix string) (string, error)
- func (r Remote) Touch(path string) error
- func (r Remote) Uncordon(node string, skipDrain bool) error
- func (r Remote) Unlink(path string) error
- func (r Remote) UploadFile(src, dest string) error
- func (r Remote) UploadFolder(src, dest string) error
- func (r Remote) UploadFolderViaTar(src, dest string) error
- func (r Remote) WriteFile(content []byte, path string, mode uint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Remote ¶
Remote connects to the server via ssh.
func NewRemoteAuthSocket ¶
NewRemoteAuthSocket creates a new Remove based using SSH_AUTH_SOCK to authorize.
func NewRemoteUsernamePassword ¶
NewRemoteUsernamePassword creates a new Remove based on a username password login.
func (Remote) AwaitNodeReady ¶
AwaitNodeReady blocks until node becomes ready.
func (Remote) AwaitReady ¶
AwaitReady blocks until the clusters becomes ready.
func (Remote) CertKey ¶
CertKey calculates a new kubeadm certificate-key and uploads the certs to etcd with the new key.
func (Remote) DeleteDisk ¶
DeleteDisk removes all data from a disk.
func (Remote) DeletePods ¶
DeletePods deletes all pods running on a node.
func (Remote) DisableCronjob ¶
DisableCronjob stops new jobs from a cronjob being scheduled.
func (Remote) DownloadFolder ¶
DownloadFolder downloads the content of a folder recursively.
func (Remote) EnableCronjob ¶
EnableCronjob activates a given cronjob.
func (Remote) ExecuteStdin ¶
ExecuteStdin runs a command on the remote server.
func (Remote) FileExists ¶
FileExists verifies a file path exists.
func (Remote) FilesMatch ¶
FilesMatch calculates and compares the hashes of two files.
func (Remote) PrepareGracefulReboot ¶
func (Remote) Reboot ¶
Reboot restarts the server via the 'reboot' command. The disk gets sync before rebooting.
func (Remote) ReceiveFile ¶
ReceiveFile download a file.
func (Remote) RestartService ¶
RestartService restarts a service via systemctl.
func (Remote) RunChanges ¶
Run executes a command on the remote server and returns true if the file changed.
func (Remote) RunFetchStdout ¶
Run executes a command on the remote server and returns the output.
func (Remote) RunStdout ¶
RunStdout executes a command on the remote server and pritns the output to stderr & stdout.
func (Remote) StopService ¶
StopService stops a service via systemctl.
func (Remote) UploadFile ¶
UploadFile uploads a file.
func (Remote) UploadFolder ¶
UploadFolder uploads the content of a folder recursively.
func (Remote) UploadFolderViaTar ¶
UploadFolder uploads the content of a folder recursively.