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
|
|
@ -25,7 +25,7 @@ const (
|
|||
|
||||
type gmondCollector struct {
|
||||
metrics map[string]*prometheus.GaugeVec
|
||||
config Config
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -34,10 +34,9 @@ func init() {
|
|||
|
||||
var illegalCharsRE = regexp.MustCompile(`[^a-zA-Z0-9_]`)
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector scraping ganglia.
|
||||
func NewGmondCollector(config Config) (Collector, error) {
|
||||
// Takes a prometheus registry and returns a new Collector scraping ganglia.
|
||||
func NewGmondCollector() (Collector, error) {
|
||||
c := gmondCollector{
|
||||
config: config,
|
||||
metrics: map[string]*prometheus.GaugeVec{},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue