func (cat *serviceKeyCatalog) ratesByService(rates map[Signature]float64, totalScore float64) map[ServiceSignature]float64 {
	rbs := make(map[ServiceSignature]float64, len(rates)+1)
	cat.mu.Lock()
	defer cat.mu.Unlock()
	for key, el := range cat.items {
		sig := el.Value.(catalogEntry).sig
		if rate, ok := rates[sig]; ok {
			rbs[key] = rate
		} else {
			cat.ll.Remove(el)
			delete(cat.items, key)
		}
	}
	rbs[ServiceSignature{}] = totalScore
	return rbs
}
// ratesByService returns a map of service signatures mapping to the rates identified using
// the signatures.
ratesByService returns a map of service signatures mapping to the rates identified using
the signatures.
// ratesByService returns a map of service signatures mapping to the rates identified using // the signatures .
func (cat *serviceKeyCatalog) ratesByService(rates map[Signature]float64, totalScore float64) map[ServiceSignature]float64 {
	rbs := make(map[ServiceSignature]float64, len(rates)+1)
	cat.mu.Lock()
	defer cat.mu.Unlock()
	for key, el := range cat.items {
		sig := el.Value.(catalogEntry).sig
		if rate, ok := rates[sig]; ok {
			rbs[key] = rate
		} else {
			cat.ll.Remove(el)
			delete(cat.items, key)
		}
	}
	rbs[ServiceSignature{}] = totalScore
	return rbs
}
func ( cat * serviceKeyCatalog ) ratesByService ( rates map [ Signature ] float64 , totalScore float64 ) map [ ServiceSignature ] float64 { rbs := make ( map [ ServiceSignature ] float64 , len ( rates ) + 1 ) cat . mu . Lock ( ) defer cat . mu . Unlock ( ) for key , el := range cat . items { sig := el . Value . ( catalogEntry ) . sig if rate , ok := rates [ sig ] ; ok { rbs [ key ] = rate } else { cat . ll . Remove ( el ) delete ( cat . items , key ) } } rbs [ ServiceSignature { } ] = totalScore return rbs }
ratesByService returns a map of service signatures mapping to the rates identified using
the signatures.
ratesByService returns a map of service signatures mapping to the rates identified using the signatures .