]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: hlua/event_hdl: expose proxy_uuid variable in server events
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 22 Mar 2023 16:49:04 +0000 (17:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 Apr 2023 12:36:45 +0000 (14:36 +0200)
Adding proxy_uuid to ServerEvent class.
proxy_uuid contains the uuid of the proxy to which the server belongs

doc/lua-api/index.rst
src/hlua.c

index f25f9dce18946898fc75c0e461b9ce1599d636c9..1bb49978dc03b2e5fb4bb9552d40938f3124ccb1 100644 (file)
@@ -1405,6 +1405,10 @@ ServerEvent class
 
   Contains the name of the proxy to which the server belongs
 
+.. js:attribute:: ServerEvent.proxy_uuid
+
+  Contains the uuid of the proxy to which the server belongs
+
 .. js:attribute:: ServerEvent.reference
 
   Reference to the live server (A :ref:`server_class`).
index e6856c822309a68c572b65b07299933ad957759c..747e6e8658468ed77cb3ab4fb3c48481982903d1 100644 (file)
@@ -9059,6 +9059,10 @@ __LJMP static int hlua_event_hdl_cb_data_push_args(struct hlua_event_sub *hlua_s
                lua_pushstring(hlua->T, "proxy_name");
                lua_pushstring(hlua->T, e_server->safe.proxy_name);
                lua_settable(hlua->T, -3);
+               /* Add server proxy uuid */
+               lua_pushstring(hlua->T, "proxy_uuid");
+               lua_pushinteger(hlua->T, e_server->safe.proxy_uuid);
+               lua_settable(hlua->T, -3);
 
                /* attempt to provide reference server object
                 * (if it wasn't removed yet, SERVER_DEL will never succeed here)