]> granicus.if.org Git - pdns/commitdiff
dnsdist kvs.rst: format code blocks correctly
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 11 Sep 2019 09:52:35 +0000 (11:52 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 11 Sep 2019 09:52:35 +0000 (11:52 +0200)
pdns/dnsdistdist/docs/reference/kvs.rst

index 999c5244f371f5eb7d4e7bcb37f933aef3876493..100e2c4e580fe501ab52619d2ddd2f16f07a9c7e 100644 (file)
@@ -23,6 +23,8 @@ Then the key used for the lookup can be selected via one of the following functi
 
 For example, to do a suffix-based lookup into a LMDB KVS database, the following rule can be used:
 
+.. code-block:: lua
+
   > kvs = newLMDBKVStore('/path/to/lmdb/database', 'database name')
   > addAction(AllRule(), KeyValueStoreLookupAction(kvs, KeyValueLookupKeySuffix(), 'kvs-suffix-result'))
 
@@ -35,6 +37,8 @@ this would result in the following lookups:
 
 Then a match is found for the last key, and the corresponding value is stored into the 'kvs-suffix-result' tag. This tag can now be used in subsequent rules to take an action based on the result of the lookup.
 
+.. code-block:: lua
+
  > addAction(TagRule('kvs-suffix-result', 'this is the value obtained from the lookup'), SpoofAction('2001:db8::1'))
 
 If the value found in the LMDB database for the key '\\8powerdns\\3com\\0' was 'this is the value obtained from the lookup', then the query is immediately answered with a AAAA record.