MINOR: event_hdl: add global tunables
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 24 Nov 2023 14:37:40 +0000 (15:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 Nov 2023 07:59:27 +0000 (08:59 +0100)
commitcb3ec978fd182f770ba9e9688143737f26801a36
treea944d1eeeb343e3b3556c342894989b21f98216f
parentf638d4b1bc12f28ca17384ff4cc6cfc009ee5df6
MINOR: event_hdl: add global tunables

The local variable "event_hdl_async_max_notif_at_once" which was
introduced with the event_hdl API was left as is but with a TODO note
telling that we should make it a global tunable.

Well, we're doing this now. To prepare for upcoming tunables related to
event_hdl API, we add a dedicated struct named event_hdl_tune which is
globally exposed through the event_hdl header file so that it may be used
from everywhere. The struct is automatically initialized in
event_hdl_init() according to defaults.h.

"event_hdl_async_max_notif_at_once" now becomes
"event_hdl_tune.max_events_at_once" with it's dedicated
configuation keyword: "tune.events.max-events-at-once".

We're also taking this opportunity to raise the default value from 10
to 100 since it's seems quite reasonnable given existing async event_hdl
users.

The documentation was updated accordingly.
doc/configuration.txt
include/haproxy/defaults.h
include/haproxy/event_hdl-t.h
include/haproxy/event_hdl.h
src/event_hdl.c