-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.go
74 lines (56 loc) · 2.43 KB
/
defaults.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package configv3
import "time"
const (
// CurrentConfigVersion is the version field for the main config file
CurrentConfigVersion = 4
// DefaultDialTimeout is the default timeout for the dial.
DefaultDialTimeout = 6 * time.Second
// DefaultNOAARetryCount is the default number of request retries.
DefaultNOAARetryCount = 5
// DefaultOverallPollingTimeout is the default maximum time that the CLI will
// poll a job running on the Cloud Controller. By default it's infinite,
// which is represented by MaxInt64.
DefaultOverallPollingTimeout = time.Duration(1 << 62)
// Developer Note: Due to bugs in using MaxInt64 during comparison, the above
// was chosen as a replacement.
// DefaultPollingInterval is the time between consecutive polls of a status.
DefaultPollingInterval = 3 * time.Second
// DefaultStagingTimeout is the default timeout for application staging.
DefaultStagingTimeout = 15 * time.Minute
// DefaultStartupTimeout is the default timeout for application starting.
DefaultStartupTimeout = 5 * time.Minute
// DefaultTarget is the default CFConfig value for Target.
DefaultTarget = ""
// DefaultSSHOAuthClient is the default oauth client ID for SSHing into an
// application/process container
DefaultSSHOAuthClient = "ssh-proxy"
// DefaultUAADisableKeepAlives is the default value that the UAA client will
// use for Transport.DisableKeepAlives. UAA connections should always be
// closed after every request because UAA communication is infrequent.
DefaultUAADisableKeepAlives = true
// DefaultUAAOAuthClient is the default client ID for the CLI when
// communicating with the UAA.
DefaultUAAOAuthClient = "cf"
// DefaultUAAOAuthClientSecret is the default client secret for the CLI when
// communicating with the UAA.
DefaultUAAOAuthClientSecret = ""
// DefaultRetryCount is the default number of request retries.
DefaultRetryCount = 2
)
// NOAARequestRetryCount returns the number of request retries.
func (*Config) NOAARequestRetryCount() int {
return DefaultNOAARetryCount
}
// PollingInterval returns the time between polls.
func (config *Config) PollingInterval() time.Duration {
return DefaultPollingInterval
}
// RequestRetryCount returns the number of request retries.
func (*Config) RequestRetryCount() int {
return DefaultRetryCount
}
// UAADisableKeepAlives returns true when TCP connections should not be reused
// for UAA.
func (*Config) UAADisableKeepAlives() bool {
return DefaultUAADisableKeepAlives
}