Authored by chunhua.zhang

add comments

... ... @@ -37,7 +37,7 @@ function toboolean(str,default)
end
end
---- read config file: http://git.yoho.cn/ops/configuration/blob/master/nginx_common_conf.yml
local query_common_conf=function()
local httpc = http:new()
... ... @@ -65,7 +65,7 @@ local query_common_conf=function()
end
end
--- read config file: http://git.yoho.cn/ops/configuration/blob/master/nginx_limit_api.yml
-->>begin: query rate limit config function definition
local query_rate_limit_conf=function()
local httpc = http:new()
... ... @@ -105,7 +105,7 @@ end
--<<end: query rate limit config function definition
-- read config file http://git.yoho.cn/ops/configuration/blob/master/nginx_limit_ip.yml
-->>begin: query limit ip access config function definition
local query_limit_ip_access_conf=function()
local httpc = http:new()
... ... @@ -268,7 +268,7 @@ timer_handler(true,25,query_limit_ip_access_conf,0)
timer_handler(true,30,query_common_conf,0)
-- every worker timing schedule configs from share cache
-- every worker read global configs from share cache into local cache
function rate_limit_conf_to_worker()
local t=lua_context.lua_conf_cache:get("api_rate_limit_conf")
if t then
... ... @@ -308,6 +308,7 @@ timer_handler(true,2,limit_ip_access_conf_to_worker)
timer_handler(true,2,query_common_conf_to_worker)
--- broadcast set_peer_down to all workers.
local stream_ctx={}
function updownstream()
local keys=upstream_cache:get_keys()
... ...