-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsettings.go
More file actions
33 lines (29 loc) · 888 Bytes
/
settings.go
File metadata and controls
33 lines (29 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package settings
import (
"os"
"time"
)
var (
ActualHome = os.Getenv("HOME")
TestHome string
TestRoot string
DeisControllerURL = os.Getenv("DEIS_CONTROLLER_URL")
DefaultEventuallyTimeout time.Duration
MaxEventuallyTimeout time.Duration
GitSSH string
Debug = os.Getenv("DEBUG") != ""
)
func init() {
defaultEventuallyTimeoutStr := os.Getenv("DEFAULT_EVENTUALLY_TIMEOUT")
if defaultEventuallyTimeoutStr == "" {
DefaultEventuallyTimeout = 60 * time.Second
} else {
DefaultEventuallyTimeout, _ = time.ParseDuration(defaultEventuallyTimeoutStr)
}
maxEventuallyTimeoutStr := os.Getenv("MAX_EVENTUALLY_TIMEOUT")
if maxEventuallyTimeoutStr == "" {
MaxEventuallyTimeout = 600 * time.Second
} else {
MaxEventuallyTimeout, _ = time.ParseDuration(maxEventuallyTimeoutStr)
}
}