dont process endpoint unless absolutely necessary

This commit is contained in:
Asim Aslam 2020-08-05 18:09:04 +01:00
parent 39bd6a6ced
commit b93cd0c964

View File

@ -127,7 +127,10 @@ func (r *registryRouter) store(services []*registry.Service) {
key := fmt.Sprintf("%s.%s", service.Name, sep.Name)
// decode endpoint
end := api.Decode(sep.Metadata)
// no endpoint or no name
if end == nil || len(end.Name) == 0 {
continue
}
// if we got nothing skip
if err := api.Validate(end); err != nil {
if logger.V(logger.TraceLevel, logger.DefaultLogger) {