code: func buildPortsToEndpointsMap(endpoints *v1.Endpoints) map[string][]hostPortPair {
  	portsToEndpoints := map[string][]hostPortPair{}
  	for i := range endpoints.Subsets {
  		ss := &endpoints.Subsets[i]
  		for i := range ss.Ports {
  			port := &ss.Ports[i]
  			for i := range ss.Addresses {
  				addr := &ss.Addresses[i]
  				portsToEndpoints[port.Name] = append(portsToEndpoints[port.Name], hostPortPair{addr.IP, int(port.Port)})
  				// Ignore the protocol field - we'll get that from the Service objects.
  			}
  		}
  	}
  	return portsToEndpoints
  }
docs: // buildPortsToEndpointsMap builds a map of portname -> all ip:ports for that
  // portname. Explode Endpoints.Subsets[*] into this structure.