.. include:: ../daemon/bindings/event.rst
+.. include:: ../modules/etcd/README.rst
+
.. _closures: https://www.lua.org/pil/6.1.html
.. _cqueues: https://25thandclement.com/~william/projects/cqueues.html
.. _LuaRocks: https://luarocks.org/
.. include:: ../modules/http/README.rst
.. include:: ../modules/http/README.doh.rst
.. include:: ../modules/daf/README.rst
-.. include:: ../modules/etcd/README.rst
Experimental features
=====================
.. _mod-etcd:
-Etcd module
------------
+Etcd support
+------------
-The module connects to Etcd peers and watches for configuration change.
-By default, the module looks for the subtree under ``/knot-resolver`` directory,
-but you can change this `in the configuration <https://github.com/mah0x211/lua-etcd#cli-err--etcdnew-optiontable->`_.
+The `etcd` module connects to `etcd <https://etcd.io/>`_ peers and watches
+for configuration changes. By default, the module watches the subtree under
+``/knot-resolver`` directory, but you can change this in the
+`etcd library configuration <https://github.com/mah0x211/lua-etcd#cli-err--etcdnew-optiontable->`_.
The subtree structure corresponds to the configuration variables in the declarative style.
.. code-block:: lua
- modules = {
- etcd = {
- prefix = '/knot-resolver',
- peer = 'http://127.0.0.1:7001'
- }
- }
+ modules.load('etcd')
+ etcd.config({
+ prefix = '/knot-resolver',
+ peer = 'http://127.0.0.1:7001'
+ })
.. warning:: Work in progress!
Dependencies
^^^^^^^^^^^^
-* `lua-etcd <https://github.com/mah0x211/lua-etcd>`_ available in LuaRocks
+* `lua-etcd <https://github.com/mah0x211/lua-etcd>`_ library available in LuaRocks
``$ luarocks install etcd --from=https://mah0x211.github.io/rocks/``