added a sensible default timeout for the vault client

This commit is contained in:
Dejan Golja
2015-10-08 18:44:00 +11:00
parent 3936943f8a
commit 4ee297408f

View File

@@ -8,12 +8,15 @@ import (
"os"
"strings"
"sync"
"time"
)
var (
errRedirect = errors.New("redirect")
defaultHTTPClientSetup sync.Once
defaultHTTPClient = &http.Client{}
defaultHTTPClient = &http.Client{
Timeout: time.Second * 5,
}
)
// Config is used to configure the creation of the client.