Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultConfig = Config{ Factories: []FactoryConfig{ DefaultFactoryConfig, }, } DefaultFactoryConfig = FactoryConfig{ ExpositionPath: "/metrics", ExpositionFormat: model.ExpositionFormatPrometheus, Vectors: []VectorConfig{ DefaultVectorConfig, }, } DefaultSampleGeneratorConfig = SampleGeneratorConfig{ Distribution: model.DistributionRandom, Interval: prommodel.Duration(time.Second), Precision: 3, } DefaultVectorConfig = VectorConfig{ Type: model.MetricTypeGauge, LabelCount: 3, LabelCardinality: 10, SampleGeneratorConfig: DefaultSampleGeneratorConfig, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Factories []FactoryConfig `yaml:"factories"`
}
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface.
type FactoryConfig ¶
type FactoryConfig struct { ExpositionPath string `yaml:"exposition_path"` ExpositionFormat model.ExpositionFormat `yaml:"exposition_format,omitempty"` InstrumentHandler bool `yaml:"instrument_handler,omitempty"` Vectors []VectorConfig `yaml:"vectors,omitempty"` }
func (*FactoryConfig) String ¶
func (c *FactoryConfig) String() string
String implements fmt.Stringer interface.
func (*FactoryConfig) UnmarshalYAML ¶
func (c *FactoryConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type SampleGeneratorConfig ¶
type SampleGeneratorConfig struct { Distribution model.SampleDistribution `yaml:"distribution"` Interval prommodel.Duration `yaml:"sample_interval"` Precision int `yaml:"sample_precision,omitempty"` Max string `yaml:"sample_max,omitempty"` Min string `yaml:"sample_min,omitempty"` // StdDev for normal distribution StdDev string `yaml:"sample_std_dev,omitempty"` // Mean for normal distribution Mean string `yaml:"sample_mean,omitempty"` // RateParameter for exponential distribution RateParameter string `yaml:"rate_parameter,omitempty"` }
func (*SampleGeneratorConfig) String ¶
func (c *SampleGeneratorConfig) String() string
String implements fmt.Stringer interface.
func (*SampleGeneratorConfig) UnmarshalYAML ¶
func (c *SampleGeneratorConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type VectorConfig ¶
type VectorConfig struct { Type model.MetricType `yaml:"type"` NamePrefix string `yaml:"name_prefix,omitempty"` Buckets []string `yaml:"buckets,omitempty"` LabelCount int `yaml:"label_count"` LabelCardinality int `yaml:"label_cardinality"` SampleGeneratorConfig SampleGeneratorConfig `yaml:",inline"` }
func (*VectorConfig) String ¶
func (c *VectorConfig) String() string
String implements fmt.Stringer interface.
func (*VectorConfig) UnmarshalYAML ¶
func (c *VectorConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.