DOC: lua: restore 80 char limitation

Restore 80 char limitation throughout the file for easier reading
on the cli, and fix some raw formatting issues without altering
html rendering.
This commit is contained in:
Aurelien DARRAGON 2023-04-20 12:16:17 +02:00 committed by Christopher Faulet
parent 096b383e16
commit 2dac67af7d

View File

@ -150,8 +150,8 @@ Core class
.. js:class:: core
The "core" class contains all the HAProxy core functions. These function are
useful for the controlling of the execution flow, registering hooks, manipulating
global maps or ACL, ...
useful for the controlling of the execution flow, registering hooks,
manipulating global maps or ACL, ...
"core" class is basically provided with HAProxy. No `require` line is
required to uses these function.
@ -163,49 +163,57 @@ Core class
:returns: integer
This attribute is an integer, it contains the value of the loglevel "emergency" (0).
This attribute is an integer, it contains the value of the loglevel
"emergency" (0).
.. js:attribute:: core.alert
:returns: integer
This attribute is an integer, it contains the value of the loglevel "alert" (1).
This attribute is an integer, it contains the value of the loglevel
"alert" (1).
.. js:attribute:: core.crit
:returns: integer
This attribute is an integer, it contains the value of the loglevel "critical" (2).
This attribute is an integer, it contains the value of the loglevel
"critical" (2).
.. js:attribute:: core.err
:returns: integer
This attribute is an integer, it contains the value of the loglevel "error" (3).
This attribute is an integer, it contains the value of the loglevel
"error" (3).
.. js:attribute:: core.warning
:returns: integer
This attribute is an integer, it contains the value of the loglevel "warning" (4).
This attribute is an integer, it contains the value of the loglevel
"warning" (4).
.. js:attribute:: core.notice
:returns: integer
This attribute is an integer, it contains the value of the loglevel "notice" (5).
This attribute is an integer, it contains the value of the loglevel
"notice" (5).
.. js:attribute:: core.info
:returns: integer
This attribute is an integer, it contains the value of the loglevel "info" (6).
This attribute is an integer, it contains the value of the loglevel
"info" (6).
.. js:attribute:: core.debug
:returns: integer
This attribute is an integer, it contains the value of the loglevel "debug" (7).
This attribute is an integer, it contains the value of the loglevel
"debug" (7).
.. js:attribute:: core.proxies
@ -474,8 +482,8 @@ Core class
:param string name: is the name of the converter.
:param table actions: is a table of string describing the HAProxy actions who
want to register to. The expected actions are 'tcp-req',
'tcp-res', 'http-req' or 'http-res'.
want to register to. The expected actions are 'tcp-req', 'tcp-res', 'http-req'
or 'http-res'.
:param function func: is the Lua function called to work as converter.
:param integer nb_args: is the expected number of argument for the action.
By default the value is 0.
@ -582,8 +590,8 @@ Core class
string function(txn, [p1 [, p2 [, ... [, p5]]]])
..
* **txn** (:ref:`txn_class`): this is the txn object associated with the current
request.
* **txn** (:ref:`txn_class`): this is the txn object associated with the
current request.
* **p1** .. **p5** (*string*): this is a list of string arguments declared in
the HAProxy configuration file. The number of arguments doesn't exceed 5.
The order and the nature of these is conventionally chosen by the
@ -659,9 +667,9 @@ Core class
**context**: body
Register a Lua function executed as a service. All the registered services can
be used in HAProxy with the prefix "lua.". A service gets an object class as
input according with the required mode.
Register a Lua function executed as a service. All the registered services
can be used in HAProxy with the prefix "lua.". A service gets an object class
as input according with the required mode.
:param string name: is the name of the service.
:param string mode: is string describing the required mode. Only 'tcp' or
@ -687,8 +695,8 @@ Core class
a HTTP applet from a proxy in tcp mode. Applets of type 'tcp' can be
called from anywhere.
Here, an example of service registration. The service just send an 'Hello world'
as an http response.
Here, an example of service registration. The service just send an
'Hello world' as an http response.
.. code-block:: lua
@ -737,8 +745,8 @@ Core class
:param function func: is the Lua function called to work as an async task.
Up to 4 optional arguments (all types supported) may be passed to the function.
(They will be passed as-is to the task function)
Up to 4 optional arguments (all types supported) may be passed to the
function. (They will be passed as-is to the task function)
The prototype of the Lua function used as argument is:
@ -747,7 +755,8 @@ Core class
function([arg1[, arg2[, ...[, arg4]]]])
..
It takes up to 4 optional arguments (provided when registering), and no output is expected.
It takes up to 4 optional arguments (provided when registering), and no
output is expected.
.. js:function:: core.register_cli([path], usage, func)
@ -785,7 +794,8 @@ Core class
> show ssl stats all
..
Then, arg1, arg2 and arg3 will contains respectively "show", "ssl" and "stats".
Then, arg1, arg2 and arg3 will contains respectively "show", "ssl" and
"stats".
arg4 will contain "all". arg5 contains nil.
.. js:function:: core.set_nice(nice)
@ -878,8 +888,8 @@ Core class
:returns: boolean, true if the network of the addresses match, else returns
false.
Match two networks. For example "127.0.0.1/32" matches "127.0.0.0/8". The order
of network is not important.
Match two networks. For example "127.0.0.1/32" matches "127.0.0.0/8". The
order of network is not important.
.. js:function:: core.tokenize(str, separators [, noblank])
@ -921,8 +931,10 @@ Core class
Register a function that will be called on specific system events.
:param array event_types: array of string containing the event types you want to subscribe to
:param function func: is the Lua function called when one of the subscribed events occur.
:param array event_types: array of string containing the event types you want
to subscribe to
:param function func: is the Lua function called when one of the subscribed
events occur.
:returns: A :ref:`event_sub_class` object.
:see: :js:func:`Server.event_sub()`.
@ -936,7 +948,8 @@ Core class
* **SERVER_UP**: when a server state goes from DOWN to UP
.. Note::
You may also use **SERVER** in **event_types** to subscribe to all server events types at once.
You may also use **SERVER** in **event_types** to subscribe to all server
events types at once.
The prototype of the Lua function used as argument is:
@ -945,9 +958,12 @@ Core class
function(event, event_data, sub, when)
..
* **event** (*string*): the event type (one of the **event_types** you specified when subscribing)
* **event_data**: specific to each event family (For **SERVER** family, a :ref:`server_event_class` object)
* **sub**: class to manage the subscription from within the event (a :ref:`event_sub_class` object)
* **event** (*string*): the event type (one of the **event_types** specified
when subscribing)
* **event_data**: specific to each event family (For **SERVER** family,
a :ref:`server_event_class` object)
* **sub**: class to manage the subscription from within the event
(a :ref:`event_sub_class` object)
* **when**: timestamp corresponding to the date when the event was generated.
It is an integer representing the number of seconds elapsed since Epoch.
It may be provided as optional argument to `os.date()` lua function to
@ -957,32 +973,34 @@ Core class
The callback function will only be scheduled on the very same thread that
performed the subscription.
Moreover, each thread treats events sequentially. It means that if you have,
let's say SERVER_UP followed by a SERVER_DOWN in a short timelapse, then
the cb function will first be called with SERVER_UP, and once it's done
handling the event, the cb function will be called again with SERVER_DOWN.
Moreover, each thread treats events sequentially. It means that if you
have, let's say SERVER_UP followed by a SERVER_DOWN in a short timelapse,
then the cb function will first be called with SERVER_UP, and once it's
done handling the event, the cb function will be called again with
SERVER_DOWN.
This is to ensure event consistency when it comes to logging / triggering logic
from lua.
This is to ensure event consistency when it comes to logging / triggering
logic from lua.
Your lua cb function may yield if needed, but you're pleased to process the
event as fast as possible to prevent the event queue from growing up, depending
on the event flow that is expected for the given subscription.
event as fast as possible to prevent the event queue from growing up,
depending on the event flow that is expected for the given subscription.
To prevent abuses, if the event queue for the current subscription goes over
a certain amount of unconsumed events, the subscription will pause itself
automatically for as long as it takes for your handler to catch up. This would
lead to events being missed, so an error will be reported in the logs to warn
you about that.
This is not something you want to let happen too often, it may indicate that
you subscribed to an event that is occurring too frequently or/and that your
callback function is too slow to keep up the pace and you should review it.
To prevent abuses, if the event queue for the current subscription goes
over a certain amount of unconsumed events, the subscription will pause
itself automatically for as long as it takes for your handler to catch up.
This would lead to events being missed, so an error will be reported in the
logs to warn you about that.
This is not something you want to let happen too often, it may indicate
that you subscribed to an event that is occurring too frequently or/and
that your callback function is too slow to keep up the pace and you should
review it.
If you want to do some parallel processing because your callback functions are
slow: you might want to create subtasks from lua using
:js:func:`core.register_task()` from within your callback function to perform
the heavy job in a dedicated task and allow remaining events to be processed
more quickly.
If you want to do some parallel processing because your callback functions
are slow: you might want to create subtasks from lua using
:js:func:`core.register_task()` from within your callback function to
perform the heavy job in a dedicated task and allow remaining events to be
processed more quickly.
.. _proxy_class:
@ -1419,7 +1437,8 @@ ServerEvent class
.. Warning::
Not available if the server was removed in the meantime.
(Will never be set for SERVER_DEL event since the server does not exist anymore)
(Will never be set for SERVER_DEL event since the server does not exist
anymore)
.. _concat_class:
@ -1624,11 +1643,10 @@ Channel class
:param class_channel channel: The manipulated Channel.
:param integer offset: *optional* The offset in incoming data to start to get
data. 0 by default. May be negative to be relative to
the end of incoming data.
data. 0 by default. May be negative to be relative to the end of incoming
data.
:param integer length: *optional* The expected length of data to retrieve. All
incoming data by default. May be set to -1 to get a
maximum of data.
incoming data by default. May be set to -1 to get a maximum of data.
:returns: a string containing the data found or nil.
.. js:function:: Channel.forward(channel, length)
@ -1662,8 +1680,8 @@ Channel class
:param class_channel channel: The manipulated Channel.
:param string string: The data to copy into incoming data.
:param integer offset: *optional* The offset in incoming data where to copy
data. 0 by default. May be negative to be relative to
the end of incoming data.
data. 0 by default. May be negative to be relative to the end of incoming
data.
:returns: an integer containing the amount of bytes copied or -1.
.. js:function:: Channel.is_full(channel)
@ -1684,8 +1702,8 @@ Channel class
This function parses **length** bytes of incoming data of the channel buffer,
starting at offset **offset**, and returns the first line found, including the
'\\n'. The data are not removed from the buffer. If no line is found, all data
are returned.
'\\n'. The data are not removed from the buffer. If no line is found, all
data are returned.
By default, if no length is provided, all incoming data, starting at the given
offset, are evaluated. If **length** is set to -1, the function tries to
@ -1700,11 +1718,10 @@ Channel class
:param class_channel channel: The manipulated Channel.
:param integer offset: *optional* The offset in incoming data to start to
parse data. 0 by default. May be negative to be
relative to the end of incoming data.
parse data. 0 by default. May be negative to be relative to the end of
incoming data.
:param integer length: *optional* The length of data to parse. All incoming
data by default. May be set to -1 to get a maximum of
data.
data by default. May be set to -1 to get a maximum of data.
:returns: a string containing the line found or nil.
.. js:function:: Channel.may_recv(channel)
@ -1747,8 +1764,8 @@ Channel class
:param class_channel channel: The manipulated Channel.
:param integer offset: *optional* The offset in incoming data where to start
to remove data. 0 by default. May be negative to
be relative to the end of incoming data.
to remove data. 0 by default. May be negative to be relative to the end of
incoming data.
:param integer length: *optional* The length of data to remove. All incoming
data by default.
:returns: an integer containing the amount of bytes removed.
@ -1766,9 +1783,9 @@ Channel class
.. js:function:: Channel.set(channel, string [, offset [, length]])
This function replaces **length** bytes of incoming data of the channel buffer,
starting at offset **offset**, by the string **string**. The function returns
the copied length on success or -1 if data cannot be copied.
This function replaces **length** bytes of incoming data of the channel
buffer, starting at offset **offset**, by the string **string**. The function
returns the copied length on success or -1 if data cannot be copied.
By default, if no length is provided, all incoming data, starting at the given
offset, are replaced. Not providing an offset is the same as setting it
@ -1778,8 +1795,8 @@ Channel class
:param class_channel channel: The manipulated Channel.
:param string string: The data to copy into incoming data.
:param integer offset: *optional* The offset in incoming data where to start
the data replacement. 0 by default. May be negative to
be relative to the end of incoming data.
the data replacement. 0 by default. May be negative to be relative to the
end of incoming data.
:param integer length: *optional* The length of data to replace. All incoming
data by default.
:returns: an integer containing the amount of bytes copied or -1.
@ -2082,20 +2099,28 @@ HTTPClient class
.. js:function:: HTTPClient.post(httpclient, request)
.. js:function:: HTTPClient.delete(httpclient, request)
Send a HTTP request and wait for a response. GET, HEAD PUT, POST and DELETE methods can be used.
The HTTPClient will send asynchronously the data and is able to send and receive more than HAProxy bufsize.
Send a HTTP request and wait for a response. GET, HEAD PUT, POST and DELETE
methods can be used.
The HTTPClient will send asynchronously the data and is able to send and
receive more than HAProxy bufsize.
The HTTPClient interface is not able to decompress responses, it is not
recommended to send an Accept-Encoding in the request so the response is
received uncompressed.
:param class httpclient: Is the manipulated HTTPClient.
:param table request: Is a table containing the parameters of the request that will be send.
:param string request.url: Is a mandatory parameter for the request that contains the URL.
:param string request.body: Is an optional parameter for the request that contains the body to send.
:param table request.headers: Is an optional parameter for the request that contains the headers to send.
:param string request.dst: Is an optional parameter for the destination in haproxy address format.
:param integer request.timeout: Optional timeout parameter, set a "timeout server" on the connections.
:param table request: Is a table containing the parameters of the request
that will be send.
:param string request.url: Is a mandatory parameter for the request that
contains the URL.
:param string request.body: Is an optional parameter for the request that
contains the body to send.
:param table request.headers: Is an optional parameter for the request that
contains the headers to send.
:param string request.dst: Is an optional parameter for the destination in
haproxy address format.
:param integer request.timeout: Optional timeout parameter, set a
"timeout server" on the connections.
:returns: Lua table containing the response
@ -2205,8 +2230,8 @@ TXN class
the stderr if it is allowed.
:param class_txn txn: The class txn object containing the data.
:param integer loglevel: Is the log level associated with the message. It is a
number between 0 and 7.
:param integer loglevel: Is the log level associated with the message. It is
a number between 0 and 7.
:param string msg: The log content.
:see: :js:attr:`core.emerg`, :js:attr:`core.alert`, :js:attr:`core.crit`,
:js:attr:`core.err`, :js:attr:`core.warning`, :js:attr:`core.notice`,
@ -2308,28 +2333,30 @@ TXN class
Converts a Lua type in a HAProxy type and store it in a variable <var>.
:param class_txn txn: The class txn object containing the data.
:param string var: The variable name according with the HAProxy variable syntax.
:param type value: The value associated to the variable. The type can be string or
integer.
:param boolean ifexist: If this parameter is set to true the variable
will only be set if it was defined elsewhere (i.e. used
within the configuration). For global variables (using the
"proc" scope), they will only be updated and never created.
It is highly recommended to always set this to true.
:param string var: The variable name according with the HAProxy variable
syntax.
:param type value: The value associated to the variable. The type can be
string or integer.
:param boolean ifexist: If this parameter is set to true the variable will
only be set if it was defined elsewhere (i.e. used within the configuration).
For global variables (using the "proc" scope), they will only be updated and
never created. It is highly recommended to always set this to true.
.. js:function:: TXN.unset_var(TXN, var)
Unset the variable <var>.
:param class_txn txn: The class txn object containing the data.
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
.. js:function:: TXN.get_var(TXN, var)
Returns data stored in the variable <var> converter in Lua type.
:param class_txn txn: The class txn object containing the data.
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
.. js:function:: TXN.reply([reply])
@ -2409,8 +2436,8 @@ TXN class
..
.. warning::
It does not make sense to call this function from sample-fetches. In this case
the behavior is the same than core.done(): it finishes the Lua
It does not make sense to call this function from sample-fetches. In this
case the behavior is the same than core.done(): it finishes the Lua
execution. The transaction is really aborted only from an action registered
function.
@ -2775,7 +2802,8 @@ Regex class
:param string regex: The regular expression according with the libc or pcre
standard
:param boolean case_sensitive: Match is case sensitive or not.
:returns: boolean status and :ref:`regex_class` or string containing fail reason.
:returns: boolean status and :ref:`regex_class` or string containing fail
reason.
.. js:function:: Regex.exec(regex, str)
@ -3057,8 +3085,8 @@ AppletHTTP class
This function adds a header in the response. Duplicated headers are not
collapsed. The special header *content-length* is used to determinate the
response length. If it does not exist, a *transfer-encoding: chunked* is set, and
all the write from the function *AppletHTTP:send()* become a chunk.
response length. If it does not exist, a *transfer-encoding: chunked* is set,
and all the write from the function *AppletHTTP:send()* become a chunk.
:param class_AppletHTTP applet: An :ref:`applethttp_class`
:param string name: the header name
@ -3125,14 +3153,14 @@ AppletHTTP class
Converts a Lua type in a HAProxy type and store it in a variable <var>.
:param class_AppletHTTP applet: An :ref:`applethttp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param type value: The value associated to the variable. The type ca be string or
integer.
:param boolean ifexist: If this parameter is set to true the variable
will only be set if it was defined elsewhere (i.e. used
within the configuration). For global variables (using the
"proc" scope), they will only be updated and never created.
It is highly recommended to always set this to true.
:param string var: The variable name according with the HAProxy variable
syntax.
:param type value: The value associated to the variable. The type ca be string
or integer.
:param boolean ifexist: If this parameter is set to true the variable will
only be set if it was defined elsewhere (i.e. used within the configuration).
For global variables (using the "proc" scope), they will only be updated and
never created. It is highly recommended to always set this to true.
:see: :js:func:`AppletHTTP.unset_var`
:see: :js:func:`AppletHTTP.get_var`
@ -3142,7 +3170,8 @@ AppletHTTP class
Unset the variable <var>.
:param class_AppletHTTP applet: An :ref:`applethttp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
:see: :js:func:`AppletHTTP.set_var`
:see: :js:func:`AppletHTTP.get_var`
@ -3151,7 +3180,8 @@ AppletHTTP class
Returns data stored in the variable <var> converter in Lua type.
:param class_AppletHTTP applet: An :ref:`applethttp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
:see: :js:func:`AppletHTTP.set_var`
:see: :js:func:`AppletHTTP.unset_var`
@ -3242,14 +3272,14 @@ AppletTCP class
Converts a Lua type in a HAProxy type and stores it in a variable <var>.
:param class_AppletTCP applet: An :ref:`applettcp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param type value: The value associated to the variable. The type can be string or
integer.
:param boolean ifexist: If this parameter is set to true the variable
will only be set if it was defined elsewhere (i.e. used
within the configuration). For global variables (using the
"proc" scope), they will only be updated and never created.
It is highly recommended to always set this to true.
:param string var: The variable name according with the HAProxy variable
syntax.
:param type value: The value associated to the variable. The type can be
string or integer.
:param boolean ifexist: If this parameter is set to true the variable will
only be set if it was defined elsewhere (i.e. used within the configuration).
For global variables (using the "proc" scope), they will only be updated and
never created. It is highly recommended to always set this to true.
:see: :js:func:`AppletTCP.unset_var`
:see: :js:func:`AppletTCP.get_var`
@ -3259,7 +3289,8 @@ AppletTCP class
Unsets the variable <var>.
:param class_AppletTCP applet: An :ref:`applettcp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
:see: :js:func:`AppletTCP.unset_var`
:see: :js:func:`AppletTCP.set_var`
@ -3268,7 +3299,8 @@ AppletTCP class
Returns data stored in the variable <var> converter in Lua type.
:param class_AppletTCP applet: An :ref:`applettcp_class`
:param string var: The variable name according with the HAProxy variable syntax.
:param string var: The variable name according with the HAProxy variable
syntax.
:see: :js:func:`AppletTCP.unset_var`
:see: :js:func:`AppletTCP.set_var`
@ -3360,9 +3392,9 @@ Action class
..
.. js:attribute:: act.CONTINUE
This attribute is an integer (0). It instructs HAProxy to continue the current
ruleset processing on the message. It is the default return code for a lua
action.
This attribute is an integer (0). It instructs HAProxy to continue the
current ruleset processing on the message. It is the default return code
for a lua action.
:returns: integer
@ -3508,7 +3540,8 @@ attributes:
* id: The filter identifier. It is a string that identifies the filter and is
optional.
* flags: The filter flags. Only :js:attr:`filter.FLT_CFG_FL_HTX` may be set for now.
* flags: The filter flags. Only :js:attr:`filter.FLT_CFG_FL_HTX` may be set
for now.
Such filter class must also define all required callback functions in the
following list. Note that :js:func:`Filter.new()` must be defined otherwise the
@ -3662,16 +3695,15 @@ HTTPMessage class
positive offset is relative to the beginning of incoming data of the
http_message buffer while negative offset is relative to their end.
If there is no incoming data and the HTTP message can't receive more data, a 'nil'
value is returned.
If there is no incoming data and the HTTP message can't receive more data,
a 'nil' value is returned.
:param class_httpmessage http_msg: The manipulated HTTP message.
:param integer offset: *optional* The offset in incoming data to start to get
data. 0 by default. May be negative to be relative to
the end of incoming data.
:param integer length: *optional* The expected length of data to retrieve. All
incoming data by default. May be set to -1 to get a
maximum of data.
data. 0 by default. May be negative to be relative to the end of incoming
data.
:param integer length: *optional* The expected length of data to retrieve.
All incoming data by default. May be set to -1 to get a maximum of data.
:returns: a string containing the data found or nil.
.. js:function:: HTTPMessage.eom(http_msg)
@ -3760,8 +3792,8 @@ HTTPMessage class
:param class_httpmessage http_msg: The manipulated HTTP message.
:param string string: The data to copy into incoming data.
:param integer offset: *optional* The offset in incoming data where to copy
data. 0 by default. May be negative to be relative to
the end of incoming data.
data. 0 by default. May be negative to be relative to the end of incoming
data.
:returns: an integer containing the amount of bytes copied or -1.
.. js:function:: HTTPMessage.is_full(http_msg)
@ -3820,8 +3852,8 @@ HTTPMessage class
:param class_httpmessage http_msg: The manipulated HTTP message.
:param integer offset: *optional* The offset in incoming data where to start
to remove data. 0 by default. May be negative to
be relative to the end of incoming data.
to remove data. 0 by default. May be negative to be relative to the end of
incoming data.
:param integer length: *optional* The length of data to remove. All incoming
data by default.
:returns: an integer containing the amount of bytes removed.
@ -3876,8 +3908,8 @@ HTTPMessage class
:param class_httpmessage http_msg: The manipulated HTTP message.
:param string string: The data to copy into incoming data.
:param integer offset: *optional* The offset in incoming data where to start
the data replacement. 0 by default. May be negative to
be relative to the end of incoming data.
the data replacement. 0 by default. May be negative to be relative to the
end of incoming data.
:param integer length: *optional* The length of data to replace. All incoming
data by default.
:returns: an integer containing the amount of bytes copied or -1.
@ -3989,16 +4021,19 @@ External Lua libraries
A lot of useful lua libraries can be found here:
* Lua toolbox has been superseded by `https://luarocks.org/ <https://luarocks.org/>`_
The old lua toolbox source code is still available here `https://github.com/catwell/lua-toolbox <https://github.com/catwell/lua-toolbox>`_ (DEPRECATED)
* Lua toolbox has been superseded by
`https://luarocks.org/ <https://luarocks.org/>`_
The old lua toolbox source code is still available here
`https://github.com/catwell/lua-toolbox <https://github.com/catwell/lua-toolbox>`_ (DEPRECATED)
Redis client library:
* `https://github.com/nrk/redis-lua <https://github.com/nrk/redis-lua>`_
This is an example about the usage of the Redis library within HAProxy. Note that
each call to any function of this library can throw an error if the socket
connection fails.
This is an example about the usage of the Redis library within HAProxy.
Note that each call to any function of this library can throw an error if
the socket connection fails.
.. code-block:: lua