mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-23 22:27:01 +00:00
Since ("MINOR: hlua_fcn: alternative to old proxy and server attributes"): - s->name(), s->puid() are superseded by s->get_name() and s->get_puid() - px->name(), px->uuid() are superseded by px->get_name() and px->get_uuid() And considering this is now the proper way to retrieve proxy name/uuid and server name/puid from lua: We're now removing such legacy attributes, but for retro-compatibility purposes we will be emulating them and warning the user for some time before completely dropping their support. To do this, we first remove old legacy code. Then we move server and proxy methods out of the metatable to allow direct elements access without systematically involving the "__index" metamethod. This allows us to involve the "__index" metamethod only when the requested key is missing from the table. Then we define relevant hlua_proxy_index and hlua_server_index functions that will be used as the "__index" metamethod to respectively handle "name, uuid" (proxy) or "name, puid" (server) keys, in which case we warn the user about the need to use the new getter function instead the legacy attribute (to prepare for the potential upcoming removal), and we call the getter function to return the value as if the getter function was directly called from the script. Note: Using the legacy variables instead of the getter functions results in a slight overhead due to the "__index" metamethod indirection, thus it is recommended to switch to the getter functions right away. With this commit we're also adding a deprecation notice about legacy attributes. |
||
---|---|---|
.. | ||
design-thoughts | ||
internals | ||
lua-api | ||
51Degrees-device-detection.txt | ||
acl.fig | ||
architecture.txt | ||
close-options.txt | ||
coding-style.txt | ||
configuration.txt | ||
cookie-options.txt | ||
DeviceAtlas-device-detection.txt | ||
gpl.txt | ||
haproxy.1 | ||
intro.txt | ||
lgpl.txt | ||
linux-syn-cookies.txt | ||
lua.txt | ||
management.txt | ||
netscaler-client-ip-insertion-protocol.txt | ||
network-namespaces.txt | ||
peers-v2.0.txt | ||
peers.txt | ||
proxy-protocol.txt | ||
queuing.fig | ||
regression-testing.txt | ||
seamless_reload.txt | ||
SOCKS4.protocol.txt | ||
SPOE.txt | ||
WURFL-device-detection.txt |