lib/synapse/service_watcher/zookeeper.rb
def deserialize_service_instance(data)
      log.debug "synapse: deserializing process data"
      decoded = JSON.parse(data)

      host = decoded['host'] || (raise ValueError, 'instance json data does not have host key')
      port = decoded['port'] || (raise ValueError, 'instance json data does not have port key')
      name = decoded['name'] || nil
      weight = decoded['weight'] || nil

      return host, port, name, weight
    end
# decode the data at a zookeeper endpoint
decode the data at a zookeeper endpoint
decode the data at a zookeeper endpoint
def deserialize_service_instance(data)
      log.debug "synapse: deserializing process data"
      decoded = JSON.parse(data)
      host = decoded['host'] || (raise ValueError, 'instance json data does not have host key')
      port = decoded['port'] || (raise ValueError, 'instance json data does not have port key')
      name = decoded['name'] || nil
      weight = decoded['weight'] || nil
      return host, port, name, weight
    end
def deserialize_service_instance ( data ) log . debug "synapse: deserializing process data" decoded = JSON . parse ( data ) host = decoded [ 'host' ] || ( raise ValueError , 'instance json data does not have host key' ) port = decoded [ 'port' ] || ( raise ValueError , 'instance json data does not have port key' ) name = decoded [ 'name' ] || nil weight = decoded [ 'weight' ] || nil return host , port , name , weight end
decode the data at a zookeeper endpoint
decode the data at a zookeeper endpoint
data