func (alloc *Allocator) lookupPeername(name string) (mesh.PeerName, error) {
	for peername, nickname := range alloc.nicknames {
		if nickname == name {
			return peername, nil
		}
	}

	return mesh.PeerNameFromString(name)
}
// Lookup a PeerName by nickname or stringified PeerName.  We can't
// call into the router for this because we are interested in peers
// that have gone away but are still in the ring, which is why we
// maintain our own nicknames map.
Lookup a PeerName by nickname or stringified PeerName.  We can't
call into the router for this because we are interested in peers
that have gone away but are still in the ring, which is why we
maintain our own nicknames map.
// Lookup a PeerName by nickname or stringified PeerName . We can ' t // call into the router for this because we are interested in peers // that have gone away but are still in the ring which is why we // maintain our own nicknames map .
func (alloc *Allocator) lookupPeername(name string) (mesh.PeerName, error) {
	for peername, nickname := range alloc.nicknames {
		if nickname == name {
			return peername, nil
		}
	}
	return mesh.PeerNameFromString(name)
}
func ( alloc * Allocator ) lookupPeername ( name string ) ( mesh . PeerName , error ) { for peername , nickname := range alloc . nicknames { if nickname == name { return peername , nil } } return mesh . PeerNameFromString ( name ) }
Lookup a PeerName by nickname or stringified PeerName.
Lookup a PeerName by nickname or stringified PeerName .