apisix/t/lib/server.lua
YuanSheng Wang c02d44f8e7
feature: added test cases about round-robin load balance algorithms. (#123)
* feature: added test cases about round-robin load balance algorithms.

* feature: added test cases about consistent hash algorithms.
2019-06-17 23:17:41 +08:00

25 lines
304 B
Lua

local _M = {}
function _M.hello()
ngx.say("hello world")
end
function _M.server_port()
ngx.print(ngx.var.server_port)
end
function _M.go()
local action = string.sub(ngx.var.uri, 2)
if not _M[action] then
return ngx.exit(404)
end
return _M[action]()
end
return _M