mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
update init command to send RPC calls over SSH tunnel
This commit is contained in:
@@ -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