You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pdns/dnsdistdist/docs/reference/actions.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ The following actions exist.
139
139
140
140
Does a lookup into the key value store referenced by 'kvs' using the key returned by 'lookupKey',
141
141
and storing the result if any into the tag named 'destinationTag'.
142
-
The store can be a CDB (:func:`newCDBKVStore`), a LMDB database (:func:`newLMDBKVStore`), or a MMDB database (:func: `newMMDBKVStore`).
142
+
The store can be a CDB (:func:`newCDBKVStore`), a LMDB database (:func:`newLMDBKVStore`), a MMDB database (:func: `newMMDBKVStore`), or a Redis instance (:func:`newRedisKVStore`).
143
143
The key can be based on the qname (:func:`KeyValueLookupKeyQName` and :func:`KeyValueLookupKeySuffix`),
144
144
source IP (:func:`KeyValueLookupKeySourceIP`) or the value of an existing tag (:func:`KeyValueLookupKeyTag`).
Copy file name to clipboardExpand all lines: pdns/dnsdistdist/docs/reference/kvs.rst
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The first step is to get a :class:`KeyValueStore` object via one of the followin
12
12
* :func:`newCDBKVStore` for a CDB database ;
13
13
* :func:`newLMDBKVStore` for a LMDB one.
14
14
* :func:`newMMDBKVStore` for a MMDB one.
15
+
* :func:`newRedisKVStore` for a Redis client.
15
16
16
17
Then the key used for the lookup can be selected via one of the following functions:
17
18
@@ -136,3 +137,22 @@ If the value found in the LMDB database for the key '\\8powerdns\\3com\\0' was '
136
137
137
138
:param MMDB mmdb: The reference to an existing MMDB database created with :func:`openMMDB`.
138
139
:param str-or-list queryParams: Key or list of keys to fetch from the retrieved object from the MMDB database. Use empty list to retrieve the whole object.
Return a new KeyValueStore object associated to the provided Redis client. The client can be created using :func:`newRedisClient`.
146
+
147
+
:param RedisClient redis: The reference to an existing Redis client created with :func:`newRedisClient`.
148
+
:param table options: A table with key: value pairs with options.
149
+
150
+
Options:
151
+
152
+
* ``lookupAction``: str - Command to use when looking up keys in Redis. Check below for supported lookup actions.
153
+
* ``dataName``: str - Additional value with different behavior depending on the lookup action.
154
+
155
+
Lookup actions:
156
+
157
+
* ``get``: str - The default lookup action. Uses Redis GET command to look up keys. ``dataName`` can be used to define a prefix to be added to all keys before looking up.
158
+
* ``hget``: str - Uses Redis HGET command to look up keys as fields of a hash. ``dataName`` is required for this action and defines the key hash is stored at.
Return true if the key returned by 'lookupKey' exists in the key value store referenced by 'kvs'.
84
-
The store can be a CDB (:func:`newCDBKVStore`), a LMDB database (:func:`newLMDBKVStore`), or a MMDB database (:func: `newMMDBKVStore`).
84
+
The store can be a CDB (:func:`newCDBKVStore`), a LMDB database (:func:`newLMDBKVStore`), a MMDB database (:func: `newMMDBKVStore`), or a Redis instance (:func:`newRedisKVStore`).
85
85
The key can be based on the qname (:func:`KeyValueLookupKeyQName` and :func:`KeyValueLookupKeySuffix`),
86
86
source IP (:func:`KeyValueLookupKeySourceIP`) or the value of an existing tag (:func:`KeyValueLookupKeyTag`).
0 commit comments