Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DEBUG bool = false
TODO (grzkv): Remove from global scope. Probably should be replaced with flags
Functions ¶
func GetDefaultLoggerConfig ¶
GetDefaultLoggerConfig returns sane default for the logger conf
Types ¶
type API ¶
type API struct { // TODO (grzkv): Why does carbonapi config refer to zipper config? // It should probably refer to the common one Zipper `yaml:",inline"` ResolveGlobs int `yaml:"resolveGlobs"` Cache CacheConfig `yaml:"cache"` TimezoneString string `yaml:"tz"` PidFile string `yaml:"pidFile"` BlockHeaderFile string `yaml:"blockHeaderFile"` BlockHeaderUpdatePeriod time.Duration `yaml:"blockHeaderUpdatePeriod"` HeadersToLog []string `yaml:"headersToLog"` UnicodeRangeTables []string `yaml:"unicodeRangeTables"` IgnoreClientTimeout bool `yaml:"ignoreClientTimeout"` DefaultColors map[string]string `yaml:"defaultColors"` FunctionsConfigs map[string]string `yaml:"functionsConfig"` GraphiteVersionForGrafana string `yaml:"graphiteVersionForGrafana"` }
API is carbonapi-specific config
type CacheConfig ¶
type CacheConfig struct { // possible values are: null, mem, memcache, replicatedMemcache Type string `yaml:"type"` Size int `yaml:"size_mb"` MemcachedServers []string `yaml:"memcachedServers"` // TODO (grzkv): This looks to be used as expiration time for cache DefaultTimeoutSec int32 `yaml:"defaultTimeoutSec"` QueryTimeoutMs uint64 `yaml:"queryTimeoutMs"` Prefix string `yaml:"prefix"` }
CacheConfig configs the cache
type Common ¶
type Common struct { Listen string `yaml:"listen"` ListenInternal string `yaml:"listenInternal"` Backends []string `yaml:"backends"` BackendsByCluster []Cluster `yaml:"backendsByCluster"` BackendsByDC []DC `yaml:"backendsByDC"` MaxProcs int `yaml:"maxProcs"` Timeouts Timeouts `yaml:"timeouts"` ConcurrencyLimitPerServer int `yaml:"concurrencyLimit"` KeepAliveInterval time.Duration `yaml:"keepAliveInterval"` MaxIdleConnsPerHost int `yaml:"maxIdleConnsPerHost"` ExpireDelaySec int32 `yaml:"expireDelaySec"` InternalRoutingCache int32 `yaml:"internalRoutingCache"` GraphiteWeb09Compatibility bool `yaml:"graphite09compat"` Buckets int `yaml:"buckets"` Graphite GraphiteConfig `yaml:"graphite"` LoggerConfig zap.Config `yaml:"loggerConfig"` Monitoring MonitoringConfig `yaml:"monitoring"` Traces Traces `yaml:"traces"` PrintErrorStackTrace bool `yaml:"printErrorStackTrace"` // RenderReplicaMismatchConfig configures the render mismatch related operations. RenderReplicaMismatchConfig RenderReplicaMismatchConfig `yaml:"renderReplicaMismatchConfig"` }
Common is the configuration shared by carbonapi and carbonzipper
func DefaultCommonConfig ¶
func DefaultCommonConfig() Common
DefaultCommonConfig gives the default config shared by carbonapi and zipper
func ParseCommon ¶
ParseCommon sets the default config, parses input one, and overrides the defaults
func (Common) GetBackends ¶ added in v0.2.0
GetBackends returns the list of backends from common configuration
type GraphiteConfig ¶
GraphiteConfig does not makes real sense
type HistogramConfig ¶
type HistogramConfig struct { Start float64 `yaml:"start"` BucketsNum int `yaml:"bucketsNum"` BucketSize float64 `yaml:"bucketSize"` }
HistogramConfig is histogram config for Prometheus metrics
type MonitoringConfig ¶
type MonitoringConfig struct { RequestDurationExp HistogramConfig `yaml:"requestDurationExpHistogram"` RequestDurationLin HistogramConfig `yaml:"requestDurationLinHistogram"` RenderDurationExp HistogramConfig `yaml:"renderDurationExpHistogram"` RenderDurationLinSimple HistogramConfig `yaml:"renderDurationLinHistogram"` FindDurationExp HistogramConfig `yaml:"findDurationExpHistogram"` FindDurationLin HistogramConfig `yaml:"findDurationLinHistogram"` FindDurationLinSimple HistogramConfig `yaml:"findDurationSimpleLinHistogram"` FindDurationLinComplex HistogramConfig `yaml:"findDurationComplexLinHistogram"` TimeInQueueExpHistogram HistogramConfig `yaml:"timeInQueueExpHistogram"` TimeInQueueLinHistogram HistogramConfig `yaml:"timeInQueueLinHistogram"` }
MonitoringConfig allows setting custom monitoring parameters
type RenderReplicaMismatchConfig ¶ added in v0.3.0
type RenderReplicaMismatchConfig struct { // RenderReplicaMismatchApproximateCheck enables the approximate float equality // check while checking for mismatches. RenderReplicaMismatchApproximateCheck bool `yaml:"renderReplicaMismatchApproximateCheck"` // RenderReplicaMatchMode indicates how carbonzipper merges the metrics from replica backends. // Possible values are: // // * `normal` - ignore the mismatches and only heal null points (default) // // * `check` - look for mismatches, and expose metrics // // * `majority` - choose the values of majority of backends in addition to exposing metrics RenderReplicaMatchMode ReplicaMatchMode `yaml:"renderReplicaMatchMode"` // RenderReplicaMismatchReportLimit limits the number of mismatched metrics to be logged // for a single render request. RenderReplicaMismatchReportLimit int `yaml:"renderReplicaMismatchReportLimit"` }
func (*RenderReplicaMismatchConfig) String ¶ added in v0.3.0
func (c *RenderReplicaMismatchConfig) String() string
type ReplicaMatchMode ¶ added in v0.3.0
type ReplicaMatchMode string
const ( ReplicaMatchModeNormal ReplicaMatchMode = "normal" ReplicaMatchModeCheck ReplicaMatchMode = "check" ReplicaMatchModeMajority ReplicaMatchMode = "majority" )
func (*ReplicaMatchMode) UnmarshalYAML ¶ added in v0.3.0
func (cm *ReplicaMatchMode) UnmarshalYAML(unmarshal func(interface{}) error) error
type Timeouts ¶
type Timeouts struct { Global time.Duration `yaml:"global"` AfterStarted time.Duration `yaml:"afterStarted"` Connect time.Duration `yaml:"connect"` }
Timeouts needs some figuring out
type Traces ¶ added in v0.2.0
type Traces struct { JaegerEndpoint string `yaml:"jaegerEndpoint"` Timeout time.Duration `yaml:"timeout"` Tags Tags `yaml:"tags"` JaegerBufferMaxCount int `yaml:"jaegerBufferMaxCount"` JaegerBatchMaxCount int `yaml:"jaegerBatchMaxCount"` }
Traces holds configuration related to tracing
type Zipper ¶
Zipper is the zipper config
func DefaultZipperConfig ¶
func DefaultZipperConfig() Zipper
DefaultZipperConfig makes a testable default config