Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created April 18, 2013 15:19
Show Gist options
  • Save bernerdschaefer/5413569 to your computer and use it in GitHub Desktop.
Save bernerdschaefer/5413569 to your computer and use it in GitHub Desktop.
var (
scrapeInterval = flag.Duration("interval", 60 * time.Second, "Scrape interval")
)
// ...
tick := time.Tick(*scrapeInterval)
for {
select {
case conf = <-configChan:
case <-tick:
// ...
tagLabels := map[string]string{}
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment