]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ring: implement a wait mode for watchers
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2019 09:17:01 +0000 (11:17 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2019 09:58:58 +0000 (11:58 +0200)
commit1d181e489c93cb74ef47144766b8841015cb8410
tree916fcd6294ae9a43020634dd08b88b7187e65701
parent70b1e50febca7562bf9e79857a7bd16bd2072185
MEDIUM: ring: implement a wait mode for watchers

Now it is possible for a reader to subscribe and wait for new events
sent to a ring buffer. When new events are written to a ring buffer,
the applets that are subscribed are woken up to display new events.
For now we only support this with the CLI applet called by "show events"
since the I/O handler is indeed a CLI I/O handler. But it's not
complicated to add other mechanisms to consume events and forward them
to external log servers for example. The wait mode is enabled by adding
"-w" after "show events <sink>". An extra "-n" was added to directly
seek to new events only.
doc/management.txt
include/types/ring.h
src/ring.c
src/sink.c