mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
update init command to send RPC calls over SSH tunnel
This commit is contained in:
1 parent
86d949ae48
commit
2514c804dc
5 files changed
+50
-90
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user