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
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
const Namespace = "node"
|
||||
|
||||
var Factories = make(map[string]func(Config) (Collector, error))
|
||||
var Factories = make(map[string]func() (Collector, error))
|
||||
|
||||
// Interface a collector has to implement.
|
||||
type Collector interface {
|
||||
|
|
@ -20,8 +20,3 @@ type Collector interface {
|
|||
// scraped. (However, for metric gathering that takes very long, it might
|
||||
// actually be better to do them proactively before scraping to minimize scrape
|
||||
// time.)
|
||||
|
||||
type Config struct {
|
||||
Config map[string]string `json:"config"`
|
||||
Attributes map[string]string `json:"attributes"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue