File: get_srv_stats.lua

package info (click to toggle)
haproxy 3.0.11-1%2Bdeb13u2
  • links: PTS, VCS
  • area: main
  • in suites: trixie-proposed-updates
  • size: 22,240 kB
  • sloc: ansic: 245,617; sh: 3,343; xml: 1,756; python: 1,330; makefile: 1,106; perl: 168; cpp: 21
file content (11 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
local function lua_get_srv_stats(txn, name)
	for _, backend in pairs(core.backends) do
		for _, server in pairs(backend.servers) do
			if server.name == name then
				return server:get_stats()
			end
		end
	end
end

core.register_fetches('get_srv_stats', lua_get_srv_stats)