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
|
|
@ -19,7 +19,7 @@ const (
|
|||
)
|
||||
|
||||
type netStatCollector struct {
|
||||
config Config
|
||||
|
||||
metrics map[string]prometheus.Gauge
|
||||
}
|
||||
|
||||
|
|
@ -27,11 +27,10 @@ func init() {
|
|||
Factories["netstat"] = NewNetStatCollector
|
||||
}
|
||||
|
||||
// NewNetStatCollector takes a config struct and returns
|
||||
// NewNetStatCollector takes a returns
|
||||
// a new Collector exposing network stats.
|
||||
func NewNetStatCollector(config Config) (Collector, error) {
|
||||
func NewNetStatCollector() (Collector, error) {
|
||||
return &netStatCollector{
|
||||
config: config,
|
||||
metrics: map[string]prometheus.Gauge{},
|
||||
}, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue