haproxy/doc
Willy Tarreau 13d2ba2a82 MEDIUM: vars: add support for a "set-var" global directive
While we do support process-wide variables ("proc.<name>"), there was
no way to preset them from the configuration. This was particularly
limiting their usefulness since configs involving them always had to
first check if the variable was set prior to performing an operation.

This patch adds a new "set-var" directive in the global section that
supports setting the proc.<name> variables from an expression, like
other set-var actions do. The syntax however follows what is already
being done for setenv, which consists in having one argument for the
variable name and another one for the expression.

Only "constant" expressions are allowed here, such as "int", "str"
etc, combined with arithmetic or string converters, and variable
lookups. A few extra sample fetch keywords like "date", "rand" and
"uuid" are also part of the constant expressions and may make sense
to allow to create a random key or differentiate processes.

The way it was done consists in parsing a dummy rule an executing the
expression in the CFG_PARSE context, then releasing the expression.
This is safe because the sample that variables store does not hold a
back pointer to expression that created them.
2021-03-26 16:34:53 +01:00
..
design-thoughts
internals CLEANUP: dynbuf: remove the unused b_alloc_fast() function 2021-03-22 16:28:05 +01:00
lua-api DOC: assorted typo fixes in the documentation 2020-12-21 11:24:56 +01:00
51Degrees-device-detection.txt
acl.fig
architecture.txt DOC: Use gender neutral language 2020-07-26 22:35:43 +02:00
close-options.txt
coding-style.txt DOC: assorted typo fixes in the documentation 2020-12-21 11:24:56 +01:00
configuration.txt MEDIUM: vars: add support for a "set-var" global directive 2021-03-26 16:34:53 +01:00
cookie-options.txt
DeviceAtlas-device-detection.txt DOC: DeviceAtlas documentation typo fix. 2021-02-19 18:02:25 +01:00
gpl.txt
haproxy.1 DOC: add description of pidfile in master-worker mode 2020-08-26 18:40:53 +02:00
intro.txt DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
lgpl.txt
linux-syn-cookies.txt
lua.txt [RELEASE] Released version 2.3-dev2 2020-07-31 14:48:32 +02:00
management.txt CLEANUP: assorted typo fixes in the code and comments 2021-03-20 09:28:58 +01:00
netscaler-client-ip-insertion-protocol.txt
network-namespaces.txt
peers-v2.0.txt DOC: Use gender neutral language 2020-07-26 22:35:43 +02:00
peers.txt
proxy-protocol.txt DOC: Use gender neutral language 2020-07-26 22:35:43 +02:00
queuing.fig
regression-testing.txt
seamless_reload.txt
SOCKS4.protocol.txt
SPOE.txt DOC: spoe: Add a note about fragmentation support in HAProxy 2021-03-02 10:34:18 +01:00
WURFL-device-detection.txt