Documentation ¶
Overview ¶
Package config includes utilities for handling configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsumerBuilders ¶
func NewConsumerBuilders(reader io.Reader) ( result []*pstore.ConsumerWithMetricsBuilder, err error)
NewConsumerBuilders creates consumer builders from a reader.
Types ¶
type ConfigList ¶
type ConfigList []ConfigPlus
ConfigList represents a list of persistent stores.
func (ConfigList) CreateConsumerBuilders ¶
func (c ConfigList) CreateConsumerBuilders() ( list []*pstore.ConsumerWithMetricsBuilder, err error)
func (*ConfigList) Reset ¶
func (c *ConfigList) Reset()
type ConfigPlus ¶
type ConfigPlus struct { // One of these pointer fields must be non-nil Kafka *kafka.Config `yaml:"kafka"` Influx *influx.Config `yaml:"influx"` OpenTSDB *tsdb.Config `yaml:"openTSDB"` LMM *lmm.Config `yaml:"lmm"` Mock *mock.Config `yaml:"mock"` Consumer ConsumerConfig `yaml:"consumer"` }
ConfigPlus represents one persistent store.
func (*ConfigPlus) NewConsumerBuilder ¶
func (c *ConfigPlus) NewConsumerBuilder() ( *pstore.ConsumerWithMetricsBuilder, error)
func (*ConfigPlus) Reset ¶
func (c *ConfigPlus) Reset()
func (*ConfigPlus) UnmarshalYAML ¶
func (c *ConfigPlus) UnmarshalYAML(unmarshal func(interface{}) error) error
type ConsumerConfig ¶
type ConsumerConfig struct { // The name of the consumer. Required. Name string `yaml:"name"` // The number of goroutines doing writing. Optional. // A zero value means 1. Concurrency uint `yaml:"concurrency"` // The number of values written each time. Optional. // A zero value means 1000. BatchSize uint `yaml:"batchSize"` // The length of time for rolling up values when writing. Optional. // Zero means write every value and do no rollup. RollUpSpan time.Duration `yaml:"rollUpSpan"` // Maximum reocrds to write per second. Optional. // 0 means no limit. RecordsPerSecond uint `yaml:"recordsPerSecond"` // Metrics whose name matches DebugMetricRegex AND whose host matches // DebugHostRegex are written to the debug file. Empty values in // both of these fields means no debugging. An empty value in // one of these fields means ignore it when deciding if a metric // matches. DebugMetricRegex string `yaml:"debugMetricRegex"` DebugHostRegex string `yaml:"debugHostRegex"` // The full path of the debug file. Optional. // If empty, debug goes to stdout. DebugFilePath string `yaml:"debugFilePath"` // If true, this consumer is paused Paused bool `yaml:"paused"` RegexesOfMetricsToExclude []string `yaml:"regexesOfMetricsToExclude"` }
ConsumerConfig creates a consumer builder
func (*ConsumerConfig) NewConsumerBuilder ¶
func (c *ConsumerConfig) NewConsumerBuilder(wf WriterFactory) ( *pstore.ConsumerWithMetricsBuilder, error)
NewConsumerBuilder creates a new consumer builder using the given WriterFactory.
func (*ConsumerConfig) Reset ¶
func (c *ConsumerConfig) Reset()
func (*ConsumerConfig) UnmarshalYAML ¶
func (c *ConsumerConfig) UnmarshalYAML( unmarshal func(interface{}) error) error
type WriterFactory ¶
type WriterFactory interface {
NewWriter() (pstore.LimitedRecordWriter, error)
}
Directories ¶
Path | Synopsis |
---|---|
Package influx enables writing metric values to influxdb.
|
Package influx enables writing metric values to influxdb. |
Package kafka enables writing metric values to kafka.
|
Package kafka enables writing metric values to kafka. |
Package lmm enables writing metric values to lmm.
|
Package lmm enables writing metric values to lmm. |
Package mock enables writing metric values to a mockdb for testing.
|
Package mock enables writing metric values to a mockdb for testing. |
Package tsdb enables writing metric values to tsdb.
|
Package tsdb enables writing metric values to tsdb. |
Click to show internal directories.
Click to hide internal directories.