config

package
v0.0.0-...-f9cc615 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2014 License: Apache-2.0, BSD-3-Clause, MIT Imports: 6 Imported by: 0

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"`

	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"`

	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"`
}

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) HeartbeatTTL

func (conf *Config) HeartbeatTTL() uint64

func (*Config) ListenerHeartbeatSyncInterval

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

func (*Config) LogLevel

func (conf *Config) LogLevel() gosteno.LogLevel

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

Jump to

Keyboard shortcuts

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