Example #1
0
func main() {
	var (
		remote = ListenAndServe(cfg.ListenAddr)
		self   = SelfStats("tsp.aggregator.", cfg.Filter)
		final  = tsdb.Join(remote, self)
		relays = relay.NewPool(cfg.Relay, final)
	)
	relays.Broadcast()
}
Example #2
0
func main() {
	var (
		plugins = collect.NewPool(cfg.CollectPath)
		self    = stats.Self("tsp.forwarder.")
		joined  = tsdb.Join(plugins.C, self)
		final   = filter.Series(cfg.Filter, joined)
		relays  = relay.NewPool(cfg.Relay, final)
	)
	go Restart(func() {
		plugins.Kill()
	})
	relays.Broadcast()
}