github.com/loggregator/cli@v6.33.1-0.20180224010324-82334f081791+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 infinit, which
    14  	// 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  	// DefaultUAAOAuthClient is the default client ID for the CLI when
    36  	// communicating with the UAA.
    37  	DefaultUAAOAuthClient = "cf"
    38  
    39  	// DefaultUAAOAuthClientSecret is the default client secret for the CLI when
    40  	// communicating with the UAA.
    41  	DefaultUAAOAuthClientSecret = ""
    42  
    43  	// DefaultRetryCount is the default number of request retries.
    44  	DefaultRetryCount = 2
    45  )
    46  
    47  // NOAARequestRetryCount returns the number of request retries.
    48  func (*Config) NOAARequestRetryCount() int {
    49  	return DefaultNOAARetryCount
    50  }
    51  
    52  // PollingInterval returns the time between polls.
    53  func (config *Config) PollingInterval() time.Duration {
    54  	return DefaultPollingInterval
    55  }
    56  
    57  // RequestRetryCount returns the number of request retries.
    58  func (*Config) RequestRetryCount() int {
    59  	return DefaultRetryCount
    60  }