]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: hlua_fcn: add Patref:commit() method
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 19 Nov 2024 15:40:20 +0000 (16:40 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 29 Nov 2024 06:23:08 +0000 (07:23 +0100)
commit8bce7ff85481182c74fa45e78831339459d625f5
treebc22733133cc648301e8fdf4cf6fe782d9e2128f
parente769d8f426d426686be9620b115fec842a41dad4
MINOR: hlua_fcn: add Patref:commit() method

commit() method may be used to commit pending updates on the local patref
object:

hlua_patref flags were added:
 HLUA_PATREF_FL_GEN means the patref object has been updated
 and it is associated to a new revision (curr_gen) in order to prepare
 and commit the pending updates.

upon commit, the pattern API is leveraged with curr_gen as revision to
commit new object items. Once commit is performed, previous (pending)
revisions that are older than the committed one are cleaned up (similar
to what's done with commit on the cli). Also, Patref function APIs now
take into account curr_gen to perform lookups.
doc/lua-api/index.rst
include/haproxy/hlua-t.h
src/hlua_fcn.c