Skip to content
Snippets Groups Projects
Commit 0c74992f authored by Marek Vavruša's avatar Marek Vavruša
Browse files

doc: added @cond and updated readme

parent da90cfa9
No related branches found
No related tags found
No related merge requests found
......@@ -258,11 +258,13 @@ Modules configuration
The daemon provides an interface for dynamic loading of :ref:`daemon modules <modules-implemented>`.
.. tip:: Use syntactic sugar for module loading. Declaring a variable ``modules`` equals to loading a table of modules.
.. tip:: Use declarative interface for module loading.
.. code-block:: lua
modules = { hints = {file = '/etc/hosts'} }
modules = {
hints = {file = '/etc/hosts'}
}
Equals to:
......@@ -294,8 +296,8 @@ Cache configuration
^^^^^^^^^^^^^^^^^^^
The cache in Knot DNS Resolver is persistent with LMDB backend, this means that the daemon doesn't lose
the cached data on restart or crash to avoid cold-starts. Interestingly the cache may be reused between cache
daemons or manipulated from other processes, making for example synchronisation between load-balanced recursors possible.
the cached data on restart or crash to avoid cold-starts. The cache may be reused between cache
daemons or manipulated from other processes, making for example synchronised load-balanced recursors possible.
.. function:: cache.open(max_size)
......
......@@ -14,7 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \addtogroup resolution
/** \addtogroup utils
* @{
*/
......@@ -34,6 +34,7 @@
/*
* Connection limits.
* @cond internal
*/
#define KR_CONN_RTT_MAX 5000
......@@ -48,5 +49,6 @@
#define KR_DNS_PORT 53
#define KR_EDNS_VERSION 0
#define KR_EDNS_PAYLOAD 4096
/* @endcond */
/** @} */
......@@ -32,6 +32,7 @@ struct kr_prop;
/*
* API definition.
* @cond internal
*/
typedef uint32_t (module_api_cb)(void);
typedef int (module_init_cb)(struct kr_module *);
......@@ -39,13 +40,9 @@ typedef int (module_deinit_cb)(struct kr_module *);
typedef int (module_config_cb)(struct kr_module *, const char *);
typedef const knot_layer_api_t* (module_layer_cb)(void);
typedef struct kr_prop *(module_prop_cb)(void);
#define KR_MODULE_API ((uint32_t) 0x20150401)
/**
* Property callback.
*/
typedef char *(kr_prop_cb)(void *, struct kr_module *, const char *);
#define KR_MODULE_API ((uint32_t) 0x20150401)
/* @endcond */
/**
* Module property (named callable).
......
......@@ -24,6 +24,7 @@
/*
* General-purpose attributes.
* @cond internal
*/
#define auto_free __attribute__((cleanup(_cleanup_free)))
extern void _cleanup_free(char **p);
......@@ -31,6 +32,7 @@ extern void _cleanup_free(char **p);
extern void _cleanup_close(int *p);
#define auto_fclose __attribute__((cleanup(_cleanup_fclose)))
extern void _cleanup_fclose(FILE **p);
/* @endcond */
/*
* Defines.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment