MINOR: event_hdl: pause/resume for subscriptions
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 10 Mar 2023 09:45:58 +0000 (10:45 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:17 +0000 (08:58 +0200)
commitf751a97a11fbb5c5c652ee5dd913eb0cc1113e28
tree086a48f356d1c6a48e1772d5bf48398242097cc3
parentb4b7320a6af10488a9568323218d0c0de669c805
MINOR: event_hdl: pause/resume for subscriptions

While working on event handling from lua, the need for a pause/resume
function to temporarily disable a subscription was raised.

We solve this by introducing the EHDL_SUB_F_PAUSED flag for
subscriptions.

The flag is set via _pause() and cleared via _resume(), and it is
checked prior to notifying the subscription in publish function.

Pause and Resume functions are also available for via lookups for
identified subscriptions.

If 68e692da0 ("MINOR: event_hdl: add event handler base api")
is being backported, then this commit should be backported with it.
include/haproxy/event_hdl-t.h
include/haproxy/event_hdl.h
src/event_hdl.c