Closed xerox-xeon closed 4 years ago
@lifeblood Could you describe the purpose and usage of your new addition? Why should we have it? And how are we going to use it?
generate an HTML page for specified upstream with URL Parameter for example: http://domain.com/status_one?upstream=foo generate foo upstream status page
location /status_one {
access_log off;
default_type text/plain;
content_by_lua_block {
local hc = require "resty.upstream.healthcheck"
ngx.say("Nginx Worker PID: ", ngx.worker.pid())
ngx.print(hc.status_page_one())
}
}
get_upstreams() can be obtain one upstream?
@lifeblood You can use the Lua if
statement to branch the code, no?
Ok
have done, pls check.
Is there any place to improve?
Hello, my name is Shao Dong, I recently in the work with your products, in order to work need me add a function(status_page_one), you see, is not useful, can be merge