Generate dereferenced array of endpoints

for printing. Only do this if verbosity requires it.
This commit is contained in:
Matthias Rampke 2017-04-06 18:26:10 +00:00
parent 06ed262ff8
commit 7bc6f81dd6

View File

@ -671,7 +671,13 @@ func accumulateEndpointsMap(endpoints *api.Endpoints, hostname string,
}
(*newEndpoints)[svcPort] = append((*newEndpoints)[svcPort], epInfo)
}
glog.V(3).Infof("Setting endpoints for %q to %+v", svcPort, (*newEndpoints)[svcPort])
if glog.V(3) {
newEPList := []string{}
for _, ep := range (*newEndpoints)[svcPort] {
newEPList = append(newEPList, ep.endpoint)
}
glog.Infof("Setting endpoints for %q to %+v", svcPort, newEPList)
}
}
}
}