mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 22:49:40 -08:00
Remove interval/timeout from Target internals
This commit is contained in:
parent
775316f8d2
commit
02f635dc24
|
@ -165,7 +165,7 @@ func (sp *scrapePool) sync(tgroups map[string]map[model.Fingerprint]*Target) {
|
|||
newTargets[fp] = tnew
|
||||
|
||||
tnew.scrapeLoop = newScrapeLoop(sp.ctx, tnew, sp.sampleAppender(tnew), sp.reportAppender(tnew))
|
||||
go tnew.scrapeLoop.run(tnew.interval(), tnew.timeout(), nil)
|
||||
go tnew.scrapeLoop.run(time.Duration(sp.config.ScrapeInterval), time.Duration(sp.config.ScrapeTimeout), nil)
|
||||
}
|
||||
}
|
||||
for fp, told := range prevTargets {
|
||||
|
|
|
@ -229,20 +229,6 @@ func (t *Target) offset(interval time.Duration) time.Duration {
|
|||
return time.Duration(next)
|
||||
}
|
||||
|
||||
func (t *Target) interval() time.Duration {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
|
||||
return time.Duration(t.scrapeConfig.ScrapeInterval)
|
||||
}
|
||||
|
||||
func (t *Target) timeout() time.Duration {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
|
||||
return time.Duration(t.scrapeConfig.ScrapeTimeout)
|
||||
}
|
||||
|
||||
func (t *Target) scheme() string {
|
||||
t.RLock()
|
||||
defer t.RUnlock()
|
||||
|
|
Loading…
Reference in a new issue