Decruft the broker by removing Event interface (#1940)

This commit is contained in:
Asim Aslam 2020-08-18 14:00:51 +01:00 committed by Vasiliy Tolstov
parent 97aca6bd55
commit a86a52cb7c

View File

@ -300,9 +300,12 @@ func (r *rtr) watchRegistry(w registry.Watcher) error {
// don't process nil entries
if res.Service == nil {
logger.Trace("Received a nil service")
continue
}
logger.Tracef("Router dealing with next route %s %+v\n", res.Action, res.Service)
// get the services domain from metadata. Fallback to wildcard.
domain := getDomain(res.Service)
@ -376,6 +379,7 @@ func (r *rtr) start() error {
case <-r.exit:
return
default:
logger.Tracef("Router starting registry watch")
w, err := r.options.Registry.Watch(registry.WatchDomain(registry.WildcardDomain))
if err != nil {
if logger.V(logger.DebugLevel, logger.DefaultLogger) {