]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: add the pre-check callback
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 21 Apr 2022 16:02:53 +0000 (18:02 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 22 Apr 2022 13:45:47 +0000 (15:45 +0200)
commitb53eb8790e03d6d6deac5b46868a8f5f5303b555
treeb8b2db1d693e6f202c1fd35c1649fa1c893b4626
parenteb50c01fef2701eb7810f9f79df3a9cf5526bfe1
MINOR: init: add the pre-check callback

This adds a call to function <fct> to the list of functions to be called at
the step just before the configuration validity checks. This is useful when you
need to create things like it would have been done during the configuration
parsing and where the initialization should continue in the configuration
check.
It could be used for example to generate a proxy with multiple servers using
the configuration parser itself. At this step the trash buffers are allocated.
Threads are not yet started so no protection is required. The function is
expected to return non-zero on success, or zero on failure. A failure will make
the process emit a succinct error message and immediately exit.
doc/internals/api/initcalls.txt
include/haproxy/init-t.h
include/haproxy/init.h
src/haproxy.c
src/init.c