Remove config from collectors.
This commit is contained in:
parent
1ebda4c0aa
commit
f7563fe7a2
5 changed files with 8 additions and 21 deletions
|
|
@ -24,19 +24,16 @@ import "C"
|
|||
const ()
|
||||
|
||||
type statCollector struct {
|
||||
config Config
|
||||
cpu *prometheus.CounterVec
|
||||
cpu *prometheus.CounterVec
|
||||
}
|
||||
|
||||
func init() {
|
||||
Factories["cpu"] = NewStatCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// network device stats.
|
||||
func NewStatCollector(config Config) (Collector, error) {
|
||||
// cpu stats.
|
||||
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