mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-05 17:23:37 +02:00
MINOR: lua: add set/get priv for applets
The applet can't have access to the session private data. This patch fix this problem. Now an applet can use private data stored by actions and fecthes.
This commit is contained in:
committed by
Willy Tarreau
parent
e34a78e5ce
commit
8db004cbf4
@@ -1596,6 +1596,24 @@ AppletHTTP class
|
||||
:param class_AppletHTTP applet: An :ref:`applethttp_class`
|
||||
:param string msg: the message to send.
|
||||
|
||||
.. js:function:: AppletHTTP.get_priv(applet)
|
||||
|
||||
Return Lua data stored in the current transaction (with the
|
||||
`AppletHTTP.set_priv()`) function. If no data are stored, it returns a nil
|
||||
value.
|
||||
|
||||
:param class_AppletHTTP applet: An :ref:`applethttp_class`
|
||||
:returns: the opaque data previsously stored, or nil if nothing is
|
||||
avalaible.
|
||||
|
||||
.. js:function:: AppletHTTP.set_priv(applet, data)
|
||||
|
||||
Store any data in the current HAProxy transaction. This action replace the
|
||||
old stored data.
|
||||
|
||||
:param class_AppletHTTP applet: An :ref:`applethttp_class`
|
||||
:param opaque data: The data which is stored in the transaction.
|
||||
|
||||
.. _applettcp_class:
|
||||
|
||||
AppletTCP class
|
||||
@@ -1659,6 +1677,24 @@ AppletTCP class
|
||||
:param class_AppletTCP applet: An :ref:`applettcp_class`
|
||||
:param string msg: the message to send.
|
||||
|
||||
.. js:function:: AppletTCP.get_priv(applet)
|
||||
|
||||
Return Lua data stored in the current transaction (with the
|
||||
`AppletTCP.set_priv()`) function. If no data are stored, it returns a nil
|
||||
value.
|
||||
|
||||
:param class_AppletTCP applet: An :ref:`applettcp_class`
|
||||
:returns: the opaque data previsously stored, or nil if nothing is
|
||||
avalaible.
|
||||
|
||||
.. js:function:: AppletTCP.set_priv(applet, data)
|
||||
|
||||
Store any data in the current HAProxy transaction. This action replace the
|
||||
old stored data.
|
||||
|
||||
:param class_AppletTCP applet: An :ref:`applettcp_class`
|
||||
:param opaque data: The data which is stored in the transaction.
|
||||
|
||||
External Lua libraries
|
||||
======================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user