]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse-global: add cfg_parse_global_localpeer
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Thu, 21 Nov 2024 16:25:09 +0000 (17:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Nov 2024 18:55:21 +0000 (19:55 +0100)
commitd253f3082355f06728ba31620abffe5c547e8207
tree1437ac0e6cafff008fe94be49821c39e5ae6bc8a
parentbfe0f9d02da63b0759434bb3abdc6f6e0f8dd4fb
MINOR: cfgparse-global: add cfg_parse_global_localpeer

This commit prepares the parsing of localpeer keyword in MODE_DISCOVERY. We
need this, as HAPROXY_LOCALPEER environment variable could be checked in the
configuration in order to enable some backend or frontend settings.

So, let's at first add a dedicated parser for localpeer. At second, we no
longer need to check, if cfg_peers is valid pointer, as in MODE_DISCOVERY we
parse only the "global" section.

In addition, let's make the code of localpeer parser a little bit more
readable.
src/cfgparse-global.c