in lib/shenyu/register/zookeeper.lua [75:87]
function _M.init(config)
_M.storage = config.shenyu_storage
_M.balancer = balancer.new(config.balancer_type)
zc = zk_cluster:new(config)
if ngx.worker.id() == 0 then
local ok, err = ngx_timer_at(2, watch, const.ZK_WATCH_PATH)
if not ok then
ngx_log(ngx.ERR, "failed to start watch: " .. err)
end
return
end
end