Use flags instead of config and remove attributes
This commit is contained in:
parent
5b20dad9ad
commit
665b05eedc
23 changed files with 87 additions and 162 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue