mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 07:34:04 -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
|
||||
apiServersMu sync.RWMutex
|
||||
runDone chan struct{}
|
||||
}
|
||||
|
||||
// Initialize sets up the discovery for usage.
|
||||
|
@ -117,14 +116,13 @@ func (kd *Discovery) Initialize() error {
|
|||
|
||||
kd.apiServers = kd.Conf.APIServers
|
||||
kd.client = client
|
||||
kd.runDone = make(chan struct{})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Run implements the TargetProvider interface.
|
||||
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)
|
||||
|
||||
switch kd.Conf.Role {
|
||||
|
|
Loading…
Reference in a new issue