Use flags instead of config and remove attributes

This commit is contained in:
Johannes 'fish' Ziemke 2015-05-20 20:04:49 +02:00
commit 665b05eedc
23 changed files with 87 additions and 162 deletions

View file

@ -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{},
}