Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListPublishers ¶ added in v0.4.0
func ListPublishers() []string
ListPublishers list supported publishers
Types ¶
type ConfigTemplate ¶ added in v0.4.0
type ConfigTemplate struct {
Metrics []MetricTemplate `yaml:"metrics" json:"metrics"`
}
ConfigTemplate is the content of user config
type MetricReading ¶ added in v0.4.0
type MetricReading struct {
ID string `json:"id"`
SrcID string `json:"src_id"`
Time int64 `json:"time"`
Label string `json:"label"`
Data interface{} `json:"data"`
Unit string `json:"unit"`
}
MetricReading represents generic event
type MetricTemplate ¶ added in v0.4.0
type MetricTemplate struct {
Label string `yaml:"label" json:"label"`
Unit string `yaml:"unit" json:"unit"`
Frequency time.Duration `yaml:"frequency" json:"frequency"`
Template ValueTemplate `yaml:"template" json:"template"`
}
MetricTemplate is readings parameter
type Publisher ¶
type Publisher interface {
Publish(ctx context.Context, e *MetricReading) error
Close() error
}
Publisher defines the interface for event publisher
type ValueTemplate ¶ added in v0.4.0
type ValueTemplate struct {
Type string `yaml:"type" json:"type"`
Min interface{} `yaml:"min" json:"min"`
Max interface{} `yaml:"max" json:"max"`
}
ValueTemplate defines the generation arguments
Click to show internal directories.
Click to hide internal directories.