lib/grenache/base.rb
def lookup(key, opts={}, &block)
      unless addr = cache.has?(key)
        addr = link.send('lookup', key, opts, &block)
        cache.save(key, addr)
      end
      yield addr if block_given?
      addr
    end
def lookup(key, opts={}, &block)
      unless addr = cache.has?(key)
        addr = link.send('lookup', key, opts, &block)
        cache.save(key, addr)
      end
      yield addr if block_given?
      addr
    end
def lookup ( key , opts = { } , & block ) unless addr = cache . has? ( key ) addr = link . send ( 'lookup' , key , opts , block ) cache . save ( key , addr ) end yield addr if block_given? addr end
Initialize can accept custom configuration parameters
 Lookup for a specific service `key`
 passed block is called with the result values
 in case of `http` backend it return the result directly
 @param key [string] identifier of the service
Initialize can accept custom configuration parameters Lookup for a specific service key passed block is called with the result values in case of http backend it return the result directly