Use flags instead of config and remove attributes

This commit is contained in:
Johannes 'fish' Ziemke 2015-05-20 20:04:49 +02:00
commit 665b05eedc
23 changed files with 87 additions and 162 deletions

View file

@ -9,7 +9,7 @@ import (
)
type runitCollector struct {
config Config
state, stateDesired, stateNormal *prometheus.GaugeVec
}
@ -18,7 +18,7 @@ func init() {
Factories["runit"] = NewRunitCollector
}
func NewRunitCollector(config Config) (Collector, error) {
func NewRunitCollector() (Collector, error) {
var (
subsystem = "service"
constLabels = prometheus.Labels{"supervisor": "runit"}
@ -26,7 +26,7 @@ func NewRunitCollector(config Config) (Collector, error) {
)
return &runitCollector{
config: config,
state: prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: Namespace,