Hello HAProxy Org.

I'm about to work on implementing dump_all_vars() from issue #1623 as my
first contribution to HAProxy. (
https://github.com/haproxy/haproxy/issues/1623)
Since this is my first work and a "good first issue", I'd like to confirm
the implementation approach before submitting patches.

Proposed Implementation:

Function signature:
  dump_all_vars([scope],[prefix])

Arguments:
  - scope (optional): variable scope(sess, txn, req, res, proc)
  - prefix (optional): filter variables by name prefix

Output format:
  varl=var1, var2=var2, ...
  (string values will be quoted: name="value")

Implementation Plan:
  - Location: src/vars.c
  - Start with basic types: int, str, bool
  - Iterate through variables list and filter by scope/prefix
  - Format output as comma-separated key=value pairs
  - Leave room for future format extension (e.g., JSON)

Example Usage:
  # Dump all txn variables
  http-request return string %[dump_all_vars(txn)]

  # Dump only variables starting with "counter"
  http-request return string %[dump_all_vars(txn,counter)]

Any concerns or suggestions before I proceed?

Thanks,
Hyeonggeun Oh (github username Geun-Oh).

Reply via email to