Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MQPayload ¶
type MQPayload []MetricPayload
type Manager ¶
type Manager interface { // Initialize the Metric Manager with a list of metrics to track Init(MetricSpec) *prometheus.Registry // Update a set of metrics in a single message payload Update(MQPayload) }
type MetricConfig ¶
type MetricConfig struct { MQName string `yaml:"mq_name"` PromName string `yaml:"prom_name"` Help string Type MetricType Labels []string }
type MetricPayload ¶
type MetricSpec ¶
type MetricSpec struct {
Metrics []MetricConfig
}
type MetricType ¶
type MetricType int64
const ( Gauge MetricType = iota Counter )
func (*MetricType) UnmarshalYAML ¶
func (mt *MetricType) UnmarshalYAML(node *yaml.Node) error
type SimpleManager ¶
type SimpleManager struct {
// contains filtered or unexported fields
}
This can be simplified into one array of struct that contains both the Type and the Collector
func NewSimpleManager ¶
func NewSimpleManager() *SimpleManager
func (*SimpleManager) Init ¶
func (m *SimpleManager) Init(metricSpec MetricSpec) *prometheus.Registry
func (*SimpleManager) Update ¶
func (m *SimpleManager) Update(mqpayload MQPayload)
Click to show internal directories.
Click to hide internal directories.