Documentation ¶
Index ¶
- Constants
- func ParseConfig(filename string, cfg interface{}) error
- func PrintConfig(cfg interface{}) error
- func RestoreFromDir(dumpDir string, storeFunc func(*points.Points))
- func RestoreFromFile(filename string, storeFunc func(*points.Points)) error
- func RuntimeStat(send helper.StatCallback)
- func TestConfig(rootDir string) string
- type App
- type Collector
- type Config
- type Duration
- type SyncWriter
Constants ¶
View Source
const MetricEndpointLocal = "local"
Variables ¶
This section is empty.
Functions ¶
func RestoreFromDir ¶ added in v0.8.0
RestoreFromDir cache and input dumps from disk to memory
func RestoreFromFile ¶ added in v0.8.0
RestoreFromFile read and parse data from single file
func RuntimeStat ¶ added in v0.9.0
func RuntimeStat(send helper.StatCallback)
func TestConfig ¶
TestConfig creates config with all files in root directory
Types ¶
type App ¶
type App struct { sync.RWMutex ConfigFilename string Config *Config Cache *cache.Cache UDP receiver.Receiver TCP receiver.Receiver Pickle receiver.Receiver CarbonLink *cache.CarbonlinkListener Persister *persister.Whisper Carbonserver *carbonserver.CarbonserverListener Collector *Collector // (!!!) Should be re-created on every change config/modules // contains filtered or unexported fields }
func (*App) DumpStop ¶ added in v0.9.0
DumpStop implements gracefully stop: * Start writing all new data to xlogs * Stop cache worker * Dump all cache to file * Stop listeners * Close xlogs * Exit application
func (*App) ParseConfig ¶
ParseConfig loads config from config file, schemas.conf, aggregation.conf
func (*App) ReloadConfig ¶
ReloadConfig reloads some settings from config
type Collector ¶ added in v0.8.0
func NewCollector ¶ added in v0.8.0
type Config ¶
type Config struct { Common commonConfig `toml:"common"` Whisper whisperConfig `toml:"whisper"` Cache cacheConfig `toml:"cache"` Udp udpConfig `toml:"udp"` Tcp tcpConfig `toml:"tcp"` Pickle pickleConfig `toml:"pickle"` Carbonlink carbonlinkConfig `toml:"carbonlink"` Carbonserver carbonserverConfig `toml:"carbonserver"` Dump dumpConfig `toml:"dump"` Pprof pprofConfig `toml:"pprof"` }
Config ...
type Duration ¶
Duration wrapper time.Duration for TOML
func (*Duration) MarshalText ¶
MarshalText encode text with TOML format
func (*Duration) UnmarshalText ¶
UnmarshalText from TOML
type SyncWriter ¶ added in v0.9.0
func (*SyncWriter) Flush ¶ added in v0.9.0
func (s *SyncWriter) Flush() error
Click to show internal directories.
Click to hide internal directories.