MINOR: event_hdl: provide event->when for advanced handlers
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 4 Apr 2023 19:41:10 +0000 (21:41 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 Apr 2023 12:36:45 +0000 (14:36 +0200)
commite9314fb7a7cc63805bddb4730ab92ef565647160
treed3208d503babf08847b45cd4e71a49ca79384d6b
parentebf58e991abd40cd617786aab503869101a65e95
MINOR: event_hdl: provide event->when for advanced handlers

For advanced async handlers only
(Registered using EVENT_HDL_ASYNC_TASK() macro):

event->when is provided as a struct timeval and fetched from 'date'
haproxy global variable.

Thanks to 'when', related event consumers will be able to timestamp
events, even if they don't work in real-time or near real-time.
Indeed, unlike sync or normal async handlers, advanced async handlers
could purposely delay the consumption of pending events, which means
that the date wouldn't be accurate if computed directly from within
the handler.
include/haproxy/event_hdl-t.h
src/event_hdl.c