]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hlua/event_hdl: per-server event subscription
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 10 Mar 2023 14:34:35 +0000 (15:34 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:17 +0000 (08:58 +0200)
commit223770ddcae094466eaa70fccc132f03511f03ec
tree4316556dde25dd4bd3260eee60e44b80f079ab15
parentc84899c63657028d1cb019758db07869ca85c0e1
MINOR: hlua/event_hdl: per-server event subscription

Now that event_hdl api is properly implemented in hlua, we may add the
per-server event subscription in addition to the global event
subscription.

Per-server subscription allows to be notified for events related to
single server. It is useful to track a server UP/DOWN and DEL events.

It works exactly like core.event_sub() except that the subscription
will be performed within the server dedicated subscription list instead
of the global one.
The callback function will only be called for server events affecting
the server from which the subscription was performed.

Regarding the implementation, it is pretty trivial at this point, we add
more doc than code this time.

Usage examples have been added to the (lua) documentation.
doc/lua-api/index.rst
src/hlua_fcn.c