config

package
v0.0.0-...-f627d75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2017 License: Apache-2.0, MIT Imports: 8 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HeartbeatPeriod                 uint64 `json:"heartbeat_period_in_seconds"`
	HeartbeatTTLInHeartbeats        uint64 `json:"heartbeat_ttl_in_heartbeats"`
	ActualFreshnessTTLInHeartbeats  uint64 `json:"actual_freshness_ttl_in_heartbeats"`
	GracePeriodInHeartbeats         uint64 `json:"grace_period_in_heartbeats"`
	DesiredFreshnessTTLInHeartbeats uint64 `json:"desired_freshness_ttl_in_heartbeats"`

	SenderPollingIntervalInHeartbeats   int `json:"sender_polling_interval_in_heartbeats"`
	SenderTimeoutInHeartbeats           int `json:"sender_timeout_in_heartbeats"`
	FetcherPollingIntervalInHeartbeats  int `json:"fetcher_polling_interval_in_heartbeats"`
	FetcherTimeoutInHeartbeats          int `json:"fetcher_timeout_in_heartbeats"`
	ShredderPollingIntervalInHeartbeats int `json:"shredder_polling_interval_in_heartbeats"`
	ShredderTimeoutInHeartbeats         int `json:"shredder_timeout_in_heartbeats"`
	AnalyzerPollingIntervalInHeartbeats int `json:"analyzer_polling_interval_in_heartbeats"`
	AnalyzerTimeoutInHeartbeats         int `json:"analyzer_timeout_in_heartbeats"`

	ListenerHeartbeatSyncIntervalInMilliseconds      int `json:"listener_heartbeat_sync_interval_in_milliseconds"`
	StoreHeartbeatCacheRefreshIntervalInMilliseconds int `json:"store_heartbeat_cache_refresh_interval_in_milliseconds"`

	DesiredStateBatchSize          int    `json:"desired_state_batch_size"`
	FetcherNetworkTimeoutInSeconds int    `json:"fetcher_network_timeout_in_seconds"`
	ActualFreshnessKey             string `json:"actual_freshness_key"`
	DesiredFreshnessKey            string `json:"desired_freshness_key"`
	CCAuthUser                     string `json:"cc_auth_user"`
	CCAuthPassword                 string `json:"cc_auth_password"`
	CCBaseURL                      string `json:"cc_base_url"`
	SkipSSLVerification            bool   `json:"skip_cert_verify"`

	CCInternalURL string `json:"cc_internal_url"`

	StoreSchemaVersion         int      `json:"store_schema_version"`
	StoreURLs                  []string `json:"store_urls"`
	StoreMaxConcurrentRequests int      `json:"store_max_concurrent_requests"`

	SenderNatsStartSubject string `json:"sender_nats_start_subject"`
	SenderNatsStopSubject  string `json:"sender_nats_stop_subject"`
	SenderMessageLimit     int    `json:"sender_message_limit"`

	NumberOfCrashesBeforeBackoffBegins int `json:"number_of_crashes_before_backoff_begins"`
	StartingBackoffDelayInHeartbeats   int `json:"starting_backoff_delay_in_heartbeats"`
	MaximumBackoffDelayInHeartbeats    int `json:"maximum_backoff_delay_in_heartbeats"`

	MetricsServerPort     int    `json:"metrics_server_port"`
	MetricsServerUser     string `json:"metrics_server_user"`
	MetricsServerPassword string `json:"metrics_server_password"`

	APIServerAddress  string `json:"api_server_address"`
	APIServerPort     int    `json:"api_server_port"`
	APIServerUsername string `json:"api_server_username"`
	APIServerPassword string `json:"api_server_password"`

	LogLevelString string `json:"log_level"`

	NATS []struct {
		Host     string `json:"host"`
		Port     int    `json:"port"`
		User     string `json:"user"`
		Password string `json:"password"`
	} `json:"nats"`

	NatsClientPingInterval int `json:"nats_client_ping_interval"`

	HttpHeartbeatServerAddress string `json:"http_heartbeat_server_address"`
	HttpHeartbeatPort          int    `json:"http_heartbeat_port"`

	SSLCerts SSL `json:"ssl"`

	DropsondePort int `json:"dropsonde_port"`

	ConsulCluster string `json:"config_cluster"`

	ETCDRequireSSL bool `json:"etcd_require_ssl"`
	ETCDSSLOptions SSL  `json:"etcd"`
}

func DefaultConfig

func DefaultConfig() (*Config, error)

func FromFile

func FromFile(path string) (*Config, error)

func FromJSON

func FromJSON(JSON []byte) (*Config, error)

func (*Config) ActualFreshnessTTL

func (conf *Config) ActualFreshnessTTL() uint64

func (*Config) AnalyzerPollingInterval

func (conf *Config) AnalyzerPollingInterval() time.Duration

func (*Config) AnalyzerTimeout

func (conf *Config) AnalyzerTimeout() time.Duration

func (*Config) DesiredFreshnessTTL

func (conf *Config) DesiredFreshnessTTL() uint64

func (*Config) FetcherNetworkTimeout

func (conf *Config) FetcherNetworkTimeout() time.Duration

func (*Config) FetcherPollingInterval

func (conf *Config) FetcherPollingInterval() time.Duration

func (*Config) FetcherTimeout

func (conf *Config) FetcherTimeout() time.Duration

func (*Config) GracePeriod

func (conf *Config) GracePeriod() int

func (*Config) HeartbeatDuration

func (conf *Config) HeartbeatDuration() time.Duration

func (*Config) HeartbeatTTL

func (conf *Config) HeartbeatTTL() uint64

func (*Config) ListenerHeartbeatSyncInterval

func (conf *Config) ListenerHeartbeatSyncInterval() time.Duration

func (*Config) LogLevel

func (conf *Config) LogLevel() (lager.LogLevel, error)

func (*Config) MaximumBackoffDelay

func (conf *Config) MaximumBackoffDelay() time.Duration

func (*Config) SenderPollingInterval

func (conf *Config) SenderPollingInterval() time.Duration

func (*Config) SenderTimeout

func (conf *Config) SenderTimeout() time.Duration

func (*Config) ShredderPollingInterval

func (conf *Config) ShredderPollingInterval() time.Duration

func (*Config) ShredderTimeout

func (conf *Config) ShredderTimeout() time.Duration

func (*Config) StartingBackoffDelay

func (conf *Config) StartingBackoffDelay() time.Duration

func (*Config) StoreHeartbeatCacheRefreshInterval

func (conf *Config) StoreHeartbeatCacheRefreshInterval() time.Duration

type SSL

type SSL struct {
	KeyFile    string `json:"key_file"`
	CertFile   string `json:"cert_file"`
	CACertFile string `json:"ca_file"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL