]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: event_hdl: add PAT_REF events
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 6 Nov 2024 16:10:52 +0000 (17:10 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 29 Nov 2024 06:22:18 +0000 (07:22 +0100)
commitf7267bd31541f3fc66cef5c0e9c36ef293b501be
tree1bf5242993c45a234dc36113063655ec9a745ff1
parentf8b697c19b3d8dfe9e12e0c03b0069357c013f20
MINOR: event_hdl: add PAT_REF events

This is some prerequisite work for implementing PAT_REF events.

In this commit we define the PAT_REF event_hdl family (which gets family
slot id #2), with the following supported events:

  - EVENT_HDL_SUB_PAT_REF_ADD: element was added to the current version of
    the pattern ref
  - EVENT_HDL_SUB_PAT_REF_DEL: element was deleted from the current
    version of the pattern ref
  - EVENT_HDL_SUB_PAT_REF_SET: element was modified in the current version
    of the pattern ref
  - EVENT_HDL_SUB_PAT_REF_COMMIT: pending element(s) was/were commited in
    the current version of the pattern ref
  - EVENT_HDL_SUB_PAT_REF_CLEAR: all elements were cleared from the
    current version of the pattern ref

The goal is to be able to track a pat_ref struct in order to be notified
when it is updated. For performance reasons, events from this family won't
provide any additional info, and will only be published in the pat_ref
subscription list. Indeed, pat_ref may be updated at a relatively high
frequency (or worse, batch work), so we cannot afford doing expensive
treatment for each update.
include/haproxy/event_hdl-t.h
src/event_hdl.c