in lib/shenyu/register/consul.lua [138:157]
function _M.init(conf)
_M.uri = conf.uri
_M.path = conf.path
_M.storage = conf.shenyu_storage
_M.balancer = balancer.new(conf.balancer_type)
if 0 == ngx.worker.id() then
local ok, err = ngx_timer_at(0, subscribe)
if not ok then
log(ERR, "failed to start watch: ", err)
return
end
end
local ok, err = ngx_timer_at(2, sync)
if not ok then
log(ERR, "failed to start sync ", err)
end
end