feat: Add timeout flag. (#26)

This commit is contained in:
Bo-Yi Wu
2017-01-29 13:56:23 +08:00
committed by GitHub
parent e5ead0fb9c
commit 57d83dcfe0
3 changed files with 14 additions and 2 deletions
+3
View File
@@ -10,6 +10,7 @@ import (
"path/filepath"
"strings"
"sync"
"time"
"github.com/appleboy/com/random"
"github.com/appleboy/drone-scp/easyssh"
@@ -42,6 +43,7 @@ type (
Password string
Key string
KeyPath string
Timeout time.Duration
Target []string
Source []string
Remove bool
@@ -121,6 +123,7 @@ func (p Plugin) Exec() error {
Port: p.Config.Port,
Key: p.Config.Key,
KeyPath: p.Config.KeyPath,
Timeout: p.Config.Timeout,
}
// Call Scp method with file you want to upload to remote server.