Exemplo n.º 1
0
func setupMonitoring(router *trafficcontroller.Router, config *Config, logger *gosteno.Logger) {
	cr := collectorregistrar.NewCollectorRegistrar(config.MbusClient, logger)
	err := cr.RegisterWithCollector(router.Component)
	if err != nil {
		panic(err)
	}

	go func() {
		err := router.StartMonitoringEndpoints()
		if err != nil {
			panic(err)
		}
	}()
}
Exemplo n.º 2
0
func startIncomingRouter(router *trafficcontroller.Router, logger *gosteno.Logger) {
	go router.Start(logger)
}