]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Documentation
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 7 Jul 2025 10:27:59 +0000 (12:27 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 9 Jul 2025 09:17:19 +0000 (11:17 +0200)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/recursordist/docs/lua-scripting/functions.rst

index b2566e0bb0b05efc9d319fb265e798414f4ca033..895024e91cb8a45c12c1ea993ff74420f1810b07 100644 (file)
@@ -67,7 +67,41 @@ These are some functions that don't really have a place in one of the other cate
 
 .. function:: getConfigDirAndName() -> str, str
 
-   .. versionadded:: 5.2.3
+   .. versionadded:: 5.2.4
 
    Get the configuration directory and the instance name.
    These two values correspond to the :ref:`setting-yaml-recursor.config_dir` and :ref:`setting-yaml-recursor.config_name` settings.
+
+.. note::
+     The :func:`putIntoNSSPeedTable` and :func:`getNSSPeedTable` functions are experimental, their functionality might change in upcoming releases.
+
+.. function:: putIntoNSSpeedTable(dump) -> int
+
+   .. versionadded:: 5.3.0
+
+   Load a nameserver speed table dump
+
+   :param str dump: The data in the proprietary format produced by :func:`getNSSpeedTable`).
+   :returns: The number of records inserted
+
+   Some entries might be skipped, for example when they are expired.
+   If the :program:`Recursor` determines the version of the data is not compatible, it will skip loading and log an error.
+   In that case 0 is returned.
+
+.. function:: getNSSpeedTable(maxSize) -> str, int
+
+   .. versionadded:: 5.3.0
+
+   Get a nameserver speed table dump in proprietary format.
+
+   :param int maxSize: The maximum size of the dump. Zero is unlimited.
+
+   :return: A string representing the nameserver speed table and an integer specifying how many record sets were retrieved
+
+   If adding an entry's data to the result would make the result size exceed ``maxSize``, the remainder of the table is skipped.
+   The format of the string produced is proprietary.
+   The string contains meta information, so the :program:`Recursor` calling :func:`putIntoNSSpeedTable` can check if the data format is compatible.
+
+   Note that setting ``maxSize`` to zero (no limit) can produce very large strings. It is wise to set a limit.
+   Additionally, setting no limit can lead to less efficient memory management while producing the dump.
+