Skip to content

Commit 3c5e2dd

Browse files
author
HAProxy Community
committed
Update docs for dev
1 parent 02ad4bb commit 3c5e2dd

File tree

3 files changed

+78
-14
lines changed

3 files changed

+78
-14
lines changed

docs/dev/configuration.html

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 3.1-dev10-40 - Configuration Manual</title>
5+
<title>HAProxy version 3.1-dev10-50 - Configuration Manual</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -4356,6 +4356,8 @@
43564356

43574357
<a class="list-group-item" href="#weight">weight</a>
43584358

4359+
<a class="list-group-item" href="#when">when</a>
4360+
43594361
<a class="list-group-item" href="#word">word</a>
43604362

43614363
<a class="list-group-item" href="#ws">ws</a>
@@ -4400,7 +4402,7 @@
44004402
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
44014403
</p>
44024404
<p class="text-right">
4403-
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/17</b></small>
4405+
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/22</b></small>
44044406
</p>
44054407
</div>
44064408
<!-- /.sidebar -->
@@ -4411,7 +4413,7 @@
44114413
<div class="text-center">
44124414
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
44134415
<h2>Configuration Manual</h2>
4414-
<p><strong>version 3.1-dev10-40</strong></p>
4416+
<p><strong>version 3.1-dev10-50</strong></p>
44154417
<p>
44164418
2024/10/16<br>
44174419

@@ -23575,9 +23577,10 @@ <h3 id="chapter-7.3.1" data-target="7.3.1"><small><a class="small" href="#7.3.1"
2357523577
<tr><td ><a href="#7-us_ltime">us_ltime(format[,offset])</a></td><td >integer</td><td >string</td></tr>
2357623578
<tr><td ><a href="#7-us_utime">us_utime(format[,offset])</a></td><td >integer</td><td >string</td></tr>
2357723579
<tr><td ><a href="#7-utime">utime(format[,offset])</a></td><td >integer</td><td >string</td></tr>
23580+
<tr><td ><a href="#7-when">when(condition)</a></td><td >any</td><td >same</td></tr>
2357823581
<tr><td ><a href="#7-word">word(index,delimiters[,count])</a></td><td >string</td><td >string</td></tr>
23579-
<tr><td ><a href="#7-wt6">wt6([avalanche])</a></td><td >binary</td><td >integer</td></tr>
2358023582
<thead><tr><th>keyword</th><th>input type</th><th>output type</th></tr></thead>
23583+
<tr><td ><a href="#7-wt6">wt6([avalanche])</a></td><td >binary</td><td >integer</td></tr>
2358123584
<tr><td ><a href="#7-x509_v_err_str">x509_v_err_str</a></td><td >integer</td><td >string</td></tr>
2358223585
<tr><td ><a href="#7-xor">xor(value)</a></td><td >integer</td><td >integer</td></tr>
2358323586
<tr><td ><a href="#7-xxh3">xxh3([seed])</a></td><td >binary</td><td >integer</td></tr>
@@ -24963,7 +24966,68 @@ <h3 id="chapter-7.3.1" data-target="7.3.1"><small><a class="small" href="#7.3.1"
2496324966
<span class="comment"># e.g. 20140710162350 127.0.0.1:57325</span>
2496424967
log-format %[date,utime(%Y%m%d%H%M%S)]\ %ci:%cp
2496524968
</code></pre>
24966-
</div><a class="anchor" name="word"></a><a class="anchor" name="7-word"></a><a class="anchor" name="7.3.1-word"></a><a class="anchor" name="word (Using ACLs and fetching samples)"></a><a class="anchor" name="word (Converters)"></a><div class="keyword"><b><a class="anchor" name="word"></a><a href="#7.3.1-word">word</a></b>(<span style="color: #080">&lt;index&gt;</span>,<span style="color: #080">&lt;delimiters&gt;</span><span style="color: #008">[,<span style="color: #080">&lt;count&gt;</span>]</span>)</div><pre class="text">Extracts the nth word counting from the beginning (positive index) or from
24969+
</div><a class="anchor" name="when"></a><a class="anchor" name="7-when"></a><a class="anchor" name="7.3.1-when"></a><a class="anchor" name="when (Using ACLs and fetching samples)"></a><a class="anchor" name="when (Converters)"></a><div class="keyword"><b><a class="anchor" name="when"></a><a href="#7.3.1-when">when</a></b>(<span style="color: #080">&lt;condition&gt;</span>)</div><pre class="text">Evaluates the condition and when true, passes the input sample as-is to the
24970+
output, otherwise return nothing. This is designed specifically to produce
24971+
some rarely needed data that should only be emitted under certain conditions,
24972+
such as debugging information when an error is met.
24973+
24974+
The condition is made of a keyword among the list below, optionally preceeded
24975+
by an exclamation mark ('!') to negate it:
24976+
24977+
- &quot;error&quot; returns true when an error was encountered during the processing
24978+
of the request or stream. It uses the same rules as &quot;<a href="#option%20dontlog-normal">dontlog-normal</a>&quot;
24979+
(e.g. a successful redispatch counts as an error).
24980+
24981+
- &quot;<a href="#option%20forwarded">forwarded</a>&quot; returns true when the request was forwarded to a backend
24982+
server
24983+
24984+
- &quot;normal&quot; returns true when no error happened (this is equivalent to
24985+
&quot;!error&quot;).
24986+
24987+
- &quot;processed&quot; returns true when the request was either forwarded to a
24988+
backend server, or processed by an applet.
24989+
24990+
- &quot;<a href="#stopping">stopping</a>&quot; returns true if the process is currently stopping when the
24991+
rule is evaluated
24992+
24993+
- &quot;toapplet&quot; returns true when the request was processed by an applet.
24994+
24995+
Note that the content is evaluated in any case, so doing this does not avoid
24996+
the generation of that information. It's only meant to avoid producing that
24997+
information.
24998+
24999+
An example would be to add backend stream debugging information in the logs
25000+
only when an error was encountered during processing, or logging extra
25001+
information when stopping, etc.
25002+
</pre><div class="separator">
25003+
<span class="label label-success">Example:</span>
25004+
<pre class="prettyprint">
25005+
<code><span class="comment"># log &quot;dbg={-}&quot; when fine, or &quot;dbg={... debug info ...}&quot; on error:</span>
25006+
log-format &quot;$HAPROXY_HTTP_LOG_FMT dbg={%[bs.debug_str,when(!normal)]}&quot;
25007+
25008+
Here, the &quot;dbg&quot; field in the log will only contain an dash ('-') to
25009+
indicate a missing content when the rule is not validated, and will emit a
25010+
whole debugging block when it is.
25011+
</code></pre>
25012+
</div><pre class="text">Example
25013+
# only emit the backend src/port when a real connection was issued:
25014+
log-format &quot;$HAPROXY_HTTP_LOG_FMT \
25015+
src=[%[bc_src,when(forwarded)]:%[bc_src_port,when(forwarded)]]&quot;
25016+
25017+
Since it kills the evaluation of the expression when it is not true, it is
25018+
also possible to use it to stop a subsequent converter from being called.
25019+
This may for example be used to call the debug() converter only upon error,
25020+
to log an element only when absolutely necessary.
25021+
</pre><div class="separator">
25022+
<span class="label label-success">Example:</span>
25023+
<pre class="prettyprint">
25024+
<code><span class="comment"># emit the whole response headers list to stderr only on error and only</span>
25025+
<span class="comment"># when the output is a connection. We abuse a dummy variable here.</span>
25026+
http-after-response set-var(res.test) \
25027+
res.hdrs,when(error),when(forwarded),debug(hdrs,stderr)
25028+
</code></pre>
25029+
</div><div class="page-header"><b>See also:</b> debug converter</div>
25030+
<a class="anchor" name="word"></a><a class="anchor" name="7-word"></a><a class="anchor" name="7.3.1-word"></a><a class="anchor" name="word (Using ACLs and fetching samples)"></a><a class="anchor" name="word (Converters)"></a><div class="keyword"><b><a class="anchor" name="word"></a><a href="#7.3.1-word">word</a></b>(<span style="color: #080">&lt;index&gt;</span>,<span style="color: #080">&lt;delimiters&gt;</span><span style="color: #008">[,<span style="color: #080">&lt;count&gt;</span>]</span>)</div><pre class="text">Extracts the nth word counting from the beginning (positive index) or from
2496725031
the end (negative index) considering given delimiters from an input string.
2496825032
Indexes start at 1 or -1 and delimiters are a string formatted list of chars.
2496925033
Empty words are skipped. This means that delimiters at the start or end of
@@ -31205,7 +31269,7 @@ <h2 id="chapter-11.3" data-target="11.3"><small><a class="small" href="#11.3">11
3120531269
<br>
3120631270
<hr>
3120731271
<div class="text-right">
31208-
HAProxy 3.1-dev10-40 &ndash; Configuration Manual<br>
31272+
HAProxy 3.1-dev10-50 &ndash; Configuration Manual<br>
3120931273
<small>, 2024/10/16</small>
3121031274
</div>
3121131275
</div>

docs/dev/intro.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 3.1-dev10-40 - Starter Guide</title>
5+
<title>HAProxy version 3.1-dev10-50 - Starter Guide</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -484,7 +484,7 @@
484484
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
485485
</p>
486486
<p class="text-right">
487-
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/17</b></small>
487+
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/22</b></small>
488488
</p>
489489
</div>
490490
<!-- /.sidebar -->
@@ -495,7 +495,7 @@
495495
<div class="text-center">
496496
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
497497
<h2>Starter Guide</h2>
498-
<p><strong>version 3.1-dev10-40</strong></p>
498+
<p><strong>version 3.1-dev10-50</strong></p>
499499
<p>
500500
<br>
501501

@@ -2515,7 +2515,7 @@ <h2 id="chapter-4.4" data-target="4.4"><small><a class="small" href="#4.4">4.4.<
25152515
<br>
25162516
<hr>
25172517
<div class="text-right">
2518-
HAProxy 3.1-dev10-40 &ndash; Starter Guide<br>
2518+
HAProxy 3.1-dev10-50 &ndash; Starter Guide<br>
25192519
<small>, </small>
25202520
</div>
25212521
</div>

docs/dev/management.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>HAProxy version 3.1-dev10-40 - Management Guide</title>
5+
<title>HAProxy version 3.1-dev10-50 - Management Guide</title>
66
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
77
<link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" />
88
<link href="../css/page.css?0.4.2-15" rel="stylesheet" />
@@ -646,7 +646,7 @@
646646
You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br>
647647
</p>
648648
<p class="text-right">
649-
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/17</b></small>
649+
<small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/10/22</b></small>
650650
</p>
651651
</div>
652652
<!-- /.sidebar -->
@@ -657,7 +657,7 @@
657657
<div class="text-center">
658658
<h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1>
659659
<h2>Management Guide</h2>
660-
<p><strong>version 3.1-dev10-40</strong></p>
660+
<p><strong>version 3.1-dev10-50</strong></p>
661661
<p>
662662
<br>
663663

@@ -5339,7 +5339,7 @@ <h2 id="chapter-13.1" data-target="13.1"><small><a class="small" href="#13.1">13
53395339
<br>
53405340
<hr>
53415341
<div class="text-right">
5342-
HAProxy 3.1-dev10-40 &ndash; Management Guide<br>
5342+
HAProxy 3.1-dev10-50 &ndash; Management Guide<br>
53435343
<small>, </small>
53445344
</div>
53455345
</div>

0 commit comments

Comments
 (0)