function _M.add_watch()

in lib/shenyu/register/zookeeper/zk_cluster.lua [75:86]


function _M.add_watch(self, path, listener)
    local client = self.client
    if not client then
        ngx_log(ngx.ERR, "conn not initialized")
    end
    local data, err = client:add_watch(path,listener)
    if data then
        listener(data.path)
        return _watch_receive(self)
    end
    return data, err
end