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
|
|
@ -21,7 +21,7 @@ const (
|
|||
)
|
||||
|
||||
type meminfoCollector struct {
|
||||
config Config
|
||||
|
||||
metrics map[string]prometheus.Gauge
|
||||
}
|
||||
|
||||
|
|
@ -29,11 +29,10 @@ func init() {
|
|||
Factories["meminfo"] = NewMeminfoCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// memory stats.
|
||||
func NewMeminfoCollector(config Config) (Collector, error) {
|
||||
func NewMeminfoCollector() (Collector, error) {
|
||||
return &meminfoCollector{
|
||||
config: config,
|
||||
metrics: map[string]prometheus.Gauge{},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue