github.com/arunkumar7540/cli@v6.45.0+incompatible/util/configv3/defaults.go (about)

     1  package configv3
     2  
     3  import "time"
     4  
     5  const (
     6  	// DefaultDialTimeout is the default timeout for the dail.
     7  	DefaultDialTimeout = 5 * time.Second
     8  
     9  	// DefaultNOAARetryCount is the default number of request retries.
    10  	DefaultNOAARetryCount = 5
    11  
    12  	// DefaultOverallPollingTimeout is the default maximum time that the CLI will
    13  	// poll a job running on the Cloud Controller. By default it's infinite,
    14  	// which is represented by MaxInt64.
    15  	DefaultOverallPollingTimeout = time.Duration(1 << 62)
    16  	// Developer Note: Due to bugs in using MaxInt64 during comparison, the above
    17  	// was chosen as a replacement.
    18  
    19  	// DefaultPollingInterval is the time between consecutive polls of a status.
    20  	DefaultPollingInterval = 3 * time.Second
    21  
    22  	// DefaultStagingTimeout is the default timeout for application staging.
    23  	DefaultStagingTimeout = 15 * time.Minute
    24  
    25  	// DefaultStartupTimeout is the default timeout for application starting.
    26  	DefaultStartupTimeout = 5 * time.Minute
    27  
    28  	// DefaultTarget is the default CFConfig value for Target.
    29  	DefaultTarget = ""
    30  
    31  	// DefaultSSHOAuthClient is the default oauth client ID for SSHing into an
    32  	// application/process container
    33  	DefaultSSHOAuthClient = "ssh-proxy"
    34  
    35  	// DefaultUAADisableKeepAlives is the default value that the UAA client will
    36  	// use for Transport.DisableKeepAlives. UAA connections should always be
    37  	// closed after every request because UAA communication is infrequent.
    38  	DefaultUAADisableKeepAlives = true
    39  
    40  	// DefaultUAAOAuthClient is the default client ID for the CLI when
    41  	// communicating with the UAA.
    42  	DefaultUAAOAuthClient = "cf"
    43  
    44  	// DefaultUAAOAuthClientSecret is the default client secret for the CLI when
    45  	// communicating with the UAA.
    46  	DefaultUAAOAuthClientSecret = ""
    47  
    48  	// DefaultRetryCount is the default number of request retries.
    49  	DefaultRetryCount = 2
    50  )
    51  
    52  // NOAARequestRetryCount returns the number of request retries.
    53  func (*Config) NOAARequestRetryCount() int {
    54  	return DefaultNOAARetryCount
    55  }
    56  
    57  // PollingInterval returns the time between polls.
    58  func (config *Config) PollingInterval() time.Duration {
    59  	return DefaultPollingInterval
    60  }
    61  
    62  // RequestRetryCount returns the number of request retries.
    63  func (*Config) RequestRetryCount() int {
    64  	return DefaultRetryCount
    65  }
    66  
    67  // UAADisableKeepAlives returns true when TCP connections should not be reused
    68  // for UAA.
    69  func (*Config) UAADisableKeepAlives() bool {
    70  	return DefaultUAADisableKeepAlives
    71  }