]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Move PoolAvailableRule to rules section 7863/head
authorMarlin Cremers <m.cremers@cvo.codes>
Wed, 29 May 2019 14:32:06 +0000 (16:32 +0200)
committerMarlin Cremers <m.cremers@cvo.codes>
Wed, 29 May 2019 14:32:06 +0000 (16:32 +0200)
pdns/dnsdistdist/docs/rules-actions.rst

index 746776da747a933ef7b5af80ea4b7d3770310d95..73398baa673a4c7818ef44ab2f06e1736e654227 100644 (file)
@@ -521,16 +521,6 @@ Functions for manipulating Self-Answered Response Rules:
 
   Move the last self answered response rule to the first position.
 
-Function for pool related rules
-
-.. function:: PoolAvailableRule(poolname)
-
-  .. versionadded:: 1.3.3
-
-  Check whether a pool has any servers available to handle queries
-
-  :param string poolname: Pool to check
-
 .. _RulesIntro:
 
 Matching Packets (Selectors)
@@ -796,6 +786,21 @@ These ``DNSRule``\ s be one of the following items:
 
   Matches if the query has trailing data.
 
+.. function:: PoolAvailableRule(poolname)
+
+  .. versionadded:: 1.3.3
+
+  Check whether a pool has any servers available to handle queries
+
+  .. code-block:: Lua
+
+    --- Send queries to default pool when servers are available
+    addAction(PoolAvailableRule(""), PoolAction(""))
+    --- Send queries to fallback pool if not
+    addAction(AllRule(), PoolAction("fallback"))
+
+  :param string poolname: Pool to check
+
 Combining Rules
 ~~~~~~~~~~~~~~~