MINOR: hlua_fcn: alternative to old proxy and server attributes
authorThierry Fournier <tfournier@arpalert.org>
Fri, 7 Oct 2022 10:07:24 +0000 (12:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 5 Apr 2023 06:58:16 +0000 (08:58 +0200)
commitb0467730a0e9f0a51ededa8754fe42b4d9ee435c
treecd4fc1c26fae7890ff709ca8248deb4ca8834da6
parent467913c84ecd1274cbb313f4e507160049cce14c
MINOR: hlua_fcn: alternative to old proxy and server attributes

This patch adds new lua methods:
- "Proxy.get_uuid()"
- "Proxy.get_name()"
- "Server.get_puid()"
- "Server.get_name()"

These methods will be equivalent to their old analog Proxy.{uuid,name}
and Server.{puid,name} attributes, but this will be the new preferred
way to fetch such infos as it duplicates memory only when necessary and
thus reduce the overall lua Server/Proxy objects memory footprint.

Legacy attributes (now superseded by the explicit getters) are expected
to be removed some day.

Co-authored-by: Aurelien DARRAGON <adarragon@haproxy.com>
doc/lua-api/index.rst
src/hlua_fcn.c