From a2feed343ad76614cdf9392623bd543e7c7044b2 Mon Sep 17 00:00:00 2001 From: Bjoern Rabenstein Date: Wed, 19 Nov 2014 19:25:21 +0100 Subject: [PATCH] Convert another occurrence from chan bool to chan struct{}. Change-Id: I11ba127a934ee3aec0fcd139ad32a7751cff77a0 --- retrieval/target.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/retrieval/target.go b/retrieval/target.go index 977389b7b..d5579bbe8 100644 --- a/retrieval/target.go +++ b/retrieval/target.go @@ -153,7 +153,7 @@ type target struct { lastScrape time.Time // Channel to signal RunScraper should stop, holds a channel // to notify once stopped. - stopScraper chan bool + stopScraper chan struct{} // Channel to queue base labels to be replaced. newBaseLabels chan clientmodel.LabelSet @@ -173,7 +173,7 @@ func NewTarget(address string, deadline time.Duration, baseLabels clientmodel.La Deadline: deadline, baseLabels: baseLabels, httpClient: utility.NewDeadlineClient(deadline), - stopScraper: make(chan bool), + stopScraper: make(chan struct{}), newBaseLabels: make(chan clientmodel.LabelSet, 1), } @@ -265,7 +265,7 @@ func (t *target) RunScraper(ingester extraction.Ingester, interval time.Duration // StopScraper implements Target. func (t *target) StopScraper() { - t.stopScraper <- true + t.stopScraper <- struct{}{} } const acceptHeader = `application/vnd.google.protobuf;proto=io.prometheus.client.MetricFamily;encoding=delimited;q=0.7,text/plain;version=0.0.4;q=0.3,application/json;schema="prometheus/telemetry";version=0.0.2;q=0.2,*/*;q=0.1`