update init command to send RPC calls over SSH tunnel

This commit is contained in:
Pavel Sviderski
2024-09-10 13:45:49 +10:00
parent 86d949ae48
commit 2514c804dc
5 changed files with 50 additions and 90 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
package cmdexec
package sshexec
import (
"context"
@@ -11,6 +11,10 @@ type Remote struct {
client *ssh.Client
}
func NewRemote(client *ssh.Client) *Remote {
return &Remote{client: client}
}
// Run runs the command on the remote host and returns its output with all leading and trailing
// white space removed.
func (r *Remote) Run(ctx context.Context, cmd string) (string, error) {