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"`
SendGlobsAsIs bool `yaml:"sendGlobsAsIs"`
AlwaysSendGlobsAsIs bool `yaml:"alwaysSendGlobsAsIs"`
MaxBatchSize int `yaml:"maxBatchSize"`
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"`
CorruptionThreshold float64 `yaml:"corruptionThreshold"`
Buckets int `yaml:"buckets"`
Graphite GraphiteConfig `yaml:"graphite"`
Logger []zapwriter.Config `yaml:"logger"`
Monitoring MonitoringConfig `yaml:"monitoring"`
Traces Traces `yaml:"traces"`
PrintErrorStackTrace bool `yaml:"printErrorStackTrace"`
}
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 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