summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukáš Ondráček <lukas.ondracek@nic.cz>2025-01-15 16:35:15 +0100
committerVladimír Čunát <vladimir.cunat@nic.cz>2025-01-19 19:40:58 +0100
commit0b25a2278bbfc0bd4b424fd6d67d3937aeff2d7e (patch)
tree38c25e4bb72d4e4eed433f4cb69b0907ca665eba
parentdaemon/defer: fix setting price-factor from views (diff)
downloadknot-resolver-0b25a2278bbfc0bd4b424fd6d67d3937aeff2d7e.tar.xz
knot-resolver-0b25a2278bbfc0bd4b424fd6d67d3937aeff2d7e.zip
daemon/defer: add price-factor to config schema
-rw-r--r--doc/_static/config.schema.json9
-rw-r--r--python/knot_resolver/datamodel/view_schema.py1
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/_static/config.schema.json b/doc/_static/config.schema.json
index 9c214885..52c3bccf 100644
--- a/doc/_static/config.schema.json
+++ b/doc/_static/config.schema.json
@@ -644,11 +644,18 @@
"type": "boolean",
"description": "Enable/disable DNS64.",
"default": true
+ },
+ "price-factor": {
+ "type": "number",
+ "minimum": 0.0,
+ "description": "Multiplies rate-limiting and defer prices of operations, use 0 to whitelist.",
+ "default": 1.0
}
},
"default": {
"minimize": true,
- "dns64": true
+ "dns64": true,
+ "price_factor": 1.0
}
}
}
diff --git a/python/knot_resolver/datamodel/view_schema.py b/python/knot_resolver/datamodel/view_schema.py
index 34305c75..7afc042d 100644
--- a/python/knot_resolver/datamodel/view_schema.py
+++ b/python/knot_resolver/datamodel/view_schema.py
@@ -12,6 +12,7 @@ class ViewOptionsSchema(ConfigSchema):
---
minimize: Send minimum amount of information in recursive queries to enhance privacy.
dns64: Enable/disable DNS64.
+ price_factor: Multiplies rate-limiting and defer prices of operations, use 0 to whitelist.
"""
minimize: bool = True