]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pattern: publish event_hdl events on pat_ref updates
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 18 Oct 2024 16:40:41 +0000 (18:40 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 29 Nov 2024 06:22:25 +0000 (07:22 +0100)
commitf72a66eef2452dec81b703a99516b6a904016aba
tree337a74033481312bd9d2a67b637d234028534a7b
parentf7267bd31541f3fc66cef5c0e9c36ef293b501be
MINOR: pattern: publish event_hdl events on pat_ref updates

Now that PAT_REF events were defined in previous commit, let's actually
publish them from pattern API where relevant. Unlike server events,
pattern reference events are only published in the pat_ref subscriber's
list on purpose, because in some setups patref updates (updates performed
on a map for instance from action or cli) are very frequent, and we don't
want to impact pattern API performance just for that.

Moreover, as the main use case is to be able to subscribe to maps updates
from Lua, allowing a per-pattern reference registration is already enough.

No additional data is provided for such events (also for performance reason)

Care was taken not to publish events when the update doesn't affect the
live subset (the one targeted by curr_gen).
include/haproxy/pattern-t.h
include/haproxy/pattern.h
src/pattern.c