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
|
|
@ -35,7 +35,7 @@ const (
|
|||
)
|
||||
|
||||
type tcpStatCollector struct {
|
||||
config Config
|
||||
|
||||
metric *prometheus.GaugeVec
|
||||
}
|
||||
|
||||
|
|
@ -43,11 +43,11 @@ func init() {
|
|||
Factories["tcpstat"] = NewTCPStatCollector
|
||||
}
|
||||
|
||||
// NewTCPStatCollector takes a config struct and returns
|
||||
// NewTCPStatCollector takes a returns
|
||||
// a new Collector exposing network stats.
|
||||
func NewTCPStatCollector(config Config) (Collector, error) {
|
||||
func NewTCPStatCollector() (Collector, error) {
|
||||
return &tcpStatCollector{
|
||||
config: config,
|
||||
|
||||
metric: prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: Namespace,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue