From: ph1 Date: Tue, 12 Oct 2021 15:29:23 +0000 (-0600) Subject: typo; update version; actually include the Lua binding X-Git-Tag: dnsdist-1.7.0-alpha2~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d898326f5a767a2af32188c3e5c91e14c19cbc0;p=thirdparty%2Fpdns.git typo; update version; actually include the Lua binding --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index e20018dc09..c9eb185bb9 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -541,7 +541,7 @@ const std::vector g_consoleKeywords{ { "OrRule", true, "selectors", "Matches the traffic if one or more of the the selectors rules does match" }, { "PoolAction", true, "poolname", "set the packet into the specified pool" }, { "PoolAvailableRule", true, "poolname", "Check whether a pool has any servers available to handle queries" }, - { "PoolOutstandingRule", true, "poolname, limit", "Check weather a pool has outstanding queries above limit" }, + { "PoolOutstandingRule", true, "poolname, limit", "Check whether a pool has outstanding queries above limit" }, { "printDNSCryptProviderFingerprint", true, "\"/path/to/providerPublic.key\"", "display the fingerprint of the provided resolver public key" }, { "ProbaRule", true, "probability", "Matches queries with a given probability. 1.0 means always" }, { "ProxyProtocolValueRule", true, "type [, value]", "matches queries with a specified Proxy Protocol TLV value of that type, optionally matching the content of the option as well" }, diff --git a/pdns/dnsdist-lua-rules.cc b/pdns/dnsdist-lua-rules.cc index 12e44a042c..19eec4ca66 100644 --- a/pdns/dnsdist-lua-rules.cc +++ b/pdns/dnsdist-lua-rules.cc @@ -568,6 +568,10 @@ void setupLuaRules(LuaContext& luaCtx) return std::shared_ptr(new PoolAvailableRule(poolname)); }); + luaCtx.writeFunction("PoolOutstandingRule", [](std::string poolname, size_t limit) { + return std::shared_ptr(new PoolOutstandingRule(poolname, limit)); + }); + luaCtx.registerFunction::*)()>("clear", [](std::shared_ptr tisr) { tisr->clear(); }); diff --git a/pdns/dnsdistdist/docs/rules-actions.rst b/pdns/dnsdistdist/docs/rules-actions.rst index e408e56ee4..b585c8df4c 100644 --- a/pdns/dnsdistdist/docs/rules-actions.rst +++ b/pdns/dnsdistdist/docs/rules-actions.rst @@ -763,6 +763,8 @@ These ``DNSRule``\ s be one of the following items: .. function:: PoolOutstandingRule(poolname, limit) + .. versionadded:: 1.7.0 + Check whether a pool has total outstanding queries above limit .. code-block:: Lua