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" "os"
"strings" "strings"
"sync" "sync"
"time"
) )
var ( var (
errRedirect = errors.New("redirect") errRedirect = errors.New("redirect")
defaultHTTPClientSetup sync.Once defaultHTTPClientSetup sync.Once
defaultHTTPClient = &http.Client{} defaultHTTPClient = &http.Client{
Timeout: time.Second * 5,
}
) )
// Config is used to configure the creation of the client. // Config is used to configure the creation of the client.