MEDIUM: cfgparse-global: parse only KWF_DISCOVERY keywords in MODE_DISCOVERY
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 1 Oct 2024 14:07:49 +0000 (16:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
commit699be6a55df2d56e30686f717a1ea1795d29cb2d
treee3c34a27004922b211ad7289c58526cba5a6d5b4
parent48371e6a3093c406933857e74bbfb0c9903052f2
MEDIUM: cfgparse-global: parse only KWF_DISCOVERY keywords in MODE_DISCOVERY

This commit is a part of the series to add a support of discovery mode in the
configuration parser and in initialization sequence.

Global section parser parses the majority of keywords in its function, so
those keywords don't have any dedicated parsers yet. Only after this parsing
block cfg_parse_global() starts to call dedicated parsers for any other
discovered keywords, which were not found in the block.

As all keywords, which should be parsed in MODE_DISCOVERY have its own parser
funtions, we can skip this block with goto discovery_kw and start directly from
the part, where we call parsers from the keywords list. KWF_DISCOVERY flag helps
to call in MODE_DISCOVERY only the parsers, which we are needed at this mode.

All unknown keywords and garbage will be ignored at this stage.
src/cfgparse-global.c