mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-30 07:03:06 -08:00
discovery/kubernetes: remove unused channel
This commit is contained in:
parent
7221228843
commit
0ff354341b
|
@ -104,7 +104,6 @@ type Discovery struct {
|
||||||
|
|
||||||
apiServers []config.URL
|
apiServers []config.URL
|
||||||
apiServersMu sync.RWMutex
|
apiServersMu sync.RWMutex
|
||||||
runDone chan struct{}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize sets up the discovery for usage.
|
// Initialize sets up the discovery for usage.
|
||||||
|
@ -117,14 +116,13 @@ func (kd *Discovery) Initialize() error {
|
||||||
|
|
||||||
kd.apiServers = kd.Conf.APIServers
|
kd.apiServers = kd.Conf.APIServers
|
||||||
kd.client = client
|
kd.client = client
|
||||||
kd.runDone = make(chan struct{})
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run implements the TargetProvider interface.
|
// Run implements the TargetProvider interface.
|
||||||
func (kd *Discovery) Run(ctx context.Context, ch chan<- []*config.TargetGroup) {
|
func (kd *Discovery) Run(ctx context.Context, ch chan<- []*config.TargetGroup) {
|
||||||
log.Debugf("Kubernetes Discovery.Run beginning")
|
log.Debugf("Start Kubernetes service discovery")
|
||||||
defer close(ch)
|
defer close(ch)
|
||||||
|
|
||||||
switch kd.Conf.Role {
|
switch kd.Conf.Role {
|
||||||
|
|
Loading…
Reference in a new issue