NewSSHExecutor creates a new executor
(host string, user string, opts ...func(e *SSHExecutor))
| 36 | |
| 37 | // NewSSHExecutor creates a new executor |
| 38 | func NewSSHExecutor(host string, user string, opts ...func(e *SSHExecutor)) Executor { |
| 39 | e := SSHExecutor{ |
| 40 | Host: host, |
| 41 | User: user, |
| 42 | } |
| 43 | |
| 44 | for _, o := range opts { |
| 45 | o(&e) |
| 46 | } |
| 47 | |
| 48 | return e |
| 49 | } |
| 50 | |
| 51 | // Execute executes a command on a remote host viá SSH |
| 52 | func (e SSHExecutor) Execute(test TestCase) TestResult { |