DOC: lua: some fixes

- remove trailing spces
 - update fetches ans converters documentation
This commit is contained in:
Thierry FOURNIER 2015-03-18 13:37:27 +01:00 committed by Willy Tarreau
parent d414f8e8b7
commit 2e4893cb7f

View File

@ -415,7 +415,31 @@ Fetches class
.. js:class:: Fetches
This class contains a lot of internal HAProxy sample fetches. See the
HAProxy documentation for more information about her usage.
HAProxy "configuration.txt" documentation for more information about her
usage. they are the chapters 7.3.2 to 7.3.6.
:see: TXN.f
:see: TXN.sf
Fetches are useful for:
* get system time,
* get environment variable,
* get random numbers,
* known backend status like the number of users in queue or the number of
connections established,
* client information like ip source or destination,
* deal with stick tables,
* Established SSL informations,
* HTTP information like headers or method.
.. code-block:: lua
function action(txn)
-- Get source IP
local clientip = txn.f:src()
end
..
Converters class
================
@ -423,7 +447,21 @@ Converters class
.. js:class:: Converters
This class contains a lot of internal HAProxy sample converters. See the
HAProxy documentation for more information about her usage.
HAProxy documentation "configuration.txt" for more information about her
usage. Its the chapter 7.3.1.
:see: TXN.c
:see: TXN.sc
Converters provides statefull transformation. They are useful for:
* converting input to base64,
* applying hash on input string (djb2, crc32, sdbm, wt6),
* format date,
* json escape,
* extracting prefered language comparing two lists,
* turn to lower or upper chars,
* deal with stick tables.
Channel class
=============
@ -445,7 +483,7 @@ Channel class
**Warning**: It is not possible to read from the response in request action,
and it is not possible to read for the request channel in response action.
.. image:: _static/Channel.png
.. image:: _static/channel.png
.. js:function:: Channel.dup(channel)