mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
lib/promscrape: add missing startWatchersForRole()
call at the beginning of apiWatcher.getLabelsForRole
This commit is contained in:
parent
3721c5353a
commit
6a21ef87b7
1 changed files with 1 additions and 0 deletions
|
@ -163,6 +163,7 @@ func newAPIWatcher(client *http.Client, apiServer, authorization string, namespa
|
||||||
|
|
||||||
// getLabelsForRole returns all the sets of labels for the given role.
|
// getLabelsForRole returns all the sets of labels for the given role.
|
||||||
func (aw *apiWatcher) getLabelsForRole(role string) []map[string]string {
|
func (aw *apiWatcher) getLabelsForRole(role string) []map[string]string {
|
||||||
|
aw.startWatchersForRole(role)
|
||||||
var ms []map[string]string
|
var ms []map[string]string
|
||||||
aw.mu.Lock()
|
aw.mu.Lock()
|
||||||
for _, uw := range aw.watchersByURL {
|
for _, uw := range aw.watchersByURL {
|
||||||
|
|
Loading…
Reference in a new issue