]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: server: add a global list of all known servers
authorWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 09:23:32 +0000 (10:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 14:00:24 +0000 (15:00 +0100)
commit198e92a8e5ec0150f1e9ea7c3f12f927a6acebac
tree0d5165e26da8398ec5f73bff5d91d0d48339d43c
parent0f143afe1b3fc71c5ea50118ed6413be55c66b40
MINOR: server: add a global list of all known servers

It's a real pain not to have access to the list of all registered servers,
because whenever there is a need to late adjust their configuration, only
those attached to regular proxies are seen, but not the peers, lua, logs
nor DNS.

What this patch does is that new_server() will automatically add the newly
created server to a global list, and it does so as well for the 1 or 2
statically allocated servers created for Lua. This way it will be possible
to iterate over all of them.
include/haproxy/server-t.h
include/haproxy/server.h
src/haproxy.c
src/hlua.c
src/server.c