diff options
Diffstat (limited to 'internal/clients')
| -rw-r--r-- | internal/clients/args.go | 1 | ||||
| -rw-r--r-- | internal/clients/runclient.go | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/internal/clients/args.go b/internal/clients/args.go index f55ce90..4f3c86a 100644 --- a/internal/clients/args.go +++ b/internal/clients/args.go @@ -16,6 +16,7 @@ type Args struct { TrustAllHosts bool Discovery string ConnectionsPerCPU int + Timeout int SSHAuthMethods []gossh.AuthMethod SSHHostKeyCallback gossh.HostKeyCallback } diff --git a/internal/clients/runclient.go b/internal/clients/runclient.go index 7a62fcc..e3be616 100644 --- a/internal/clients/runclient.go +++ b/internal/clients/runclient.go @@ -35,6 +35,11 @@ func (c RunClient) makeHandler(server string) handlers.Handler { func (c RunClient) makeCommands() (commands []string) { // Send "run COMMAND" to server! + if c.Timeout > 0 { + commands = append(commands, fmt.Sprintf("timeout %d %s %s", c.Timeout, c.Mode.String(), c.What)) + return + } + commands = append(commands, fmt.Sprintf("%s %s", c.Mode.String(), c.What)) return } |
