2016-09-01 12:55:35 +00:00
|
|
|
package collector
|
2016-08-26 06:59:27 +00:00
|
|
|
|
2016-09-01 14:04:43 +00:00
|
|
|
import "github.com/prometheus/client_golang/prometheus"
|
|
|
|
|
|
|
|
// ...
|
2016-08-26 06:59:27 +00:00
|
|
|
const (
|
2016-09-01 14:04:43 +00:00
|
|
|
Namespace = "wmi"
|
2016-08-26 06:59:27 +00:00
|
|
|
)
|
2016-09-01 14:04:43 +00:00
|
|
|
|
|
|
|
// Factories ...
|
|
|
|
var Factories = make(map[string]func() (Collector, error))
|
|
|
|
|
|
|
|
// Collector is the interface a collector has to implement.
|
|
|
|
type Collector interface {
|
|
|
|
// Get new metrics and expose them via prometheus registry.
|
|
|
|
Collect(ch chan<- prometheus.Metric) (err error)
|
|
|
|
}
|