Amaury Denoyelle | 14c3c5c | 2021-08-23 14:10:51 +0200 | [diff] [blame] | 1 | local function lua_get_srv_stats(txn, name) |
2 | for _, backend in pairs(core.backends) do | ||||
3 | for _, server in pairs(backend.servers) do | ||||
4 | if server.name == name then | ||||
5 | return server:get_stats() | ||||
6 | end | ||||
7 | end | ||||
8 | end | ||||
9 | end | ||||
10 | |||||
11 | core.register_fetches('get_srv_stats', lua_get_srv_stats) |