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) } }() }
func startIncomingRouter(router *trafficcontroller.Router, logger *gosteno.Logger) { go router.Start(logger) }