discovery-manager comment update

This commit is contained in:
Krasi Georgiev 2018-01-04 21:57:28 +00:00
parent 135ea0f793
commit 77bf6bece0

View File

@ -74,7 +74,8 @@ type Manager struct {
logger log.Logger
actionCh chan func(context.Context)
discoverCancel []context.CancelFunc
// We use map[string]*targetgroup.Group to handle Discoverers that send only updates instead of all targets on every update.
// Some Discoverers(eg. k8s) send only the updates for a given target group
// so we use map[tg.Source]*targetgroup.Group to know which group to update.
targets map[poolKey]map[string]*targetgroup.Group
// The sync channels sends the updates in map[targetSetName] where targetSetName is the job value from the scrape config.
syncCh chan map[string][]*targetgroup.Group