mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
discovery: simplify client initialization
This commit is contained in:
parent
b5bfb502df
commit
76076bfb47
|
@ -25,7 +25,6 @@ func NewMarathon(conf *config.MarathonSDConfig) *marathon.Discovery {
|
||||||
return &marathon.Discovery{
|
return &marathon.Discovery{
|
||||||
Servers: conf.Servers,
|
Servers: conf.Servers,
|
||||||
RefreshInterval: time.Duration(conf.RefreshInterval),
|
RefreshInterval: time.Duration(conf.RefreshInterval),
|
||||||
Done: make(chan struct{}),
|
|
||||||
Client: marathon.FetchApps,
|
Client: marathon.FetchApps,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,8 @@ func newTestDiscovery(client AppListClient) (chan []*config.TargetGroup, *Discov
|
||||||
ch := make(chan []*config.TargetGroup)
|
ch := make(chan []*config.TargetGroup)
|
||||||
md := &Discovery{
|
md := &Discovery{
|
||||||
Servers: []string{"http://localhost:8080"},
|
Servers: []string{"http://localhost:8080"},
|
||||||
|
Client: client,
|
||||||
}
|
}
|
||||||
md.Client = client
|
|
||||||
return ch, md
|
return ch, md
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue