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
|
|
@ -17,7 +17,7 @@ const (
|
|||
)
|
||||
|
||||
type statCollector struct {
|
||||
config Config
|
||||
|
||||
cpu *prometheus.CounterVec
|
||||
intr prometheus.Counter
|
||||
ctxt prometheus.Counter
|
||||
|
|
@ -31,11 +31,11 @@ func init() {
|
|||
Factories["stat"] = NewStatCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// network device stats.
|
||||
func NewStatCollector(config Config) (Collector, error) {
|
||||
func NewStatCollector() (Collector, error) {
|
||||
return &statCollector{
|
||||
config: config,
|
||||
|
||||
cpu: prometheus.NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Namespace: Namespace,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue