haproxy/reg-tests/sample_fetches
Willy Tarreau b8bd1ee893 MEDIUM: cli: add a new experimental "set var" command
set var <name> <expression>
  Allows to set or overwrite the process-wide variable 'name' with the result
  of expression <expression>. Only process-wide variables may be used, so the
  name must begin with 'proc.' otherwise no variable will be set. The
  <expression> may only involve "internal" sample fetch keywords and converters
  even though the most likely useful ones will be str('something') or int().
  Note that the command line parser doesn't know about quotes, so any space in
  the expression must be preceeded by a backslash. This command requires levels
  "operator" or "admin". This command is only supported on a CLI connection
  running in experimental mode (see "experimental-mode on").

Just like for "set-var" in the global section, the command uses a temporary
dummy proxy to create a temporary "set-var(name)" rule to assign the value.

The reg test was updated to verify that an updated global variable is properly
reflected in subsequent HTTP responses.
2021-03-26 16:57:43 +01:00
..
cook.vtc REGTESTS: Add sample_fetches/cook.vtc 2020-11-13 19:46:15 +01:00
hashes.vtc REGTESTS: mark sample_fetches/hashes.vtc as 2.4-only 2021-02-04 18:07:59 +01:00
so_name.vtc MINOR: listener: add so_name sample fetch 2020-03-29 05:47:29 +02:00
srv_name.vtc
vars.vtc MEDIUM: cli: add a new experimental "set var" command 2021-03-26 16:57:43 +01:00