scrape/manager.go
func (m *Manager) TargetsAll() map[string][]*Target {
	m.mtxScrape.Lock()
	defer m.mtxScrape.Unlock()

	targets := make(map[string][]*Target, len(m.scrapePools))
	for tset, sp := range m.scrapePools {
		targets[tset] = append(sp.ActiveTargets(), sp.DroppedTargets()...)

	}
	return targets
}
func (m *Manager) TargetsAll() map[string][]*Target {
	m.mtxScrape.Lock()
	defer m.mtxScrape.Unlock()

	targets := make(map[string][]*Target, len(m.scrapePools))
	for tset, sp := range m.scrapePools {
		targets[tset] = append(sp.ActiveTargets(), sp.DroppedTargets()...)

	}
	return targets
}
func ( m * Manager ) TargetsAll ( ) map [ string ] [ ] * Target { m . mtxScrape . Lock ( ) defer m . mtxScrape . Unlock ( ) targets := make ( map [ string ] [ ] * Target , len ( m . scrapePools ) ) for tset , sp := range m . scrapePools { targets [ tset ] = append ( sp . ActiveTargets ( ) , sp . DroppedTargets ( ) ... ) } return targets }
// TargetsAll returns active and dropped targets grouped by job_name.
TargetsAll returns active and dropped targets grouped by job_name .