Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
5b80a057
Commit
5b80a057
authored
Jun 16, 2016
by
Marek Vavrusa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: cleanup
parent
00776953
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
46 deletions
+46
-46
daemon/README.rst
daemon/README.rst
+25
-25
modules/daf/README.rst
modules/daf/README.rst
+0
-0
modules/hints/README.rst
modules/hints/README.rst
+20
-20
modules/http/README.rst
modules/http/README.rst
+1
-1
No files found.
daemon/README.rst
View file @
5b80a057
...
...
@@ -802,12 +802,12 @@ daemons or manipulated from other processes, making for example synchronised loa
.. code-block:: lua
-- Clear records at/below 'bad.cz'
cache.clear('*.bad.cz')
-- Clear packet cache
cache.clear('*. P')
-- Clear whole cache
cache.clear()
-- Clear records at/below 'bad.cz'
cache.clear('*.bad.cz')
-- Clear packet cache
cache.clear('*. P')
-- Clear whole cache
cache.clear()
Timers and events
...
...
@@ -829,7 +829,7 @@ For example, ``5 * hour`` represents five hours, or 5*60*60*100 milliseconds.
.. code-block:: lua
event.after(1 * minute, function() print('Hi!') end)
event.after(1 * minute, function() print('Hi!') end)
.. function:: event.recurrent(interval, function)
...
...
@@ -841,11 +841,11 @@ For example, ``5 * hour`` represents five hours, or 5*60*60*100 milliseconds.
.. code-block:: lua
msg_count = 0
event.recurrent(5 * sec, function(e)
msg_count = msg_count + 1
print('Hi #'..msg_count)
end)
msg_count = 0
event.recurrent(5 * sec, function(e)
msg_count = msg_count + 1
print('Hi #'..msg_count)
end)
.. function:: event.reschedule(event_id, timeout)
...
...
@@ -857,13 +857,13 @@ For example, ``5 * hour`` represents five hours, or 5*60*60*100 milliseconds.
.. code-block:: lua
local interval = 1 * minute
event.after(1 * minute, function (ev)
print('Good morning!')
-- Halven the interval for each iteration
interval = interval / 2
event.reschedule(ev, interval)
end)
local interval = 1 * minute
event.after(1 * minute, function (ev)
print('Good morning!')
-- Halven the interval for each iteration
interval = interval / 2
event.reschedule(ev, interval)
end)
.. function:: event.cancel(event_id)
...
...
@@ -875,8 +875,8 @@ For example, ``5 * hour`` represents five hours, or 5*60*60*100 milliseconds.
.. code-block:: lua
e = event.after(1 * minute, function() print('Hi!') end)
event.cancel(e)
e = event.after(1 * minute, function() print('Hi!') end)
event.cancel(e)
Watch for file descriptor activity. This allows embedding other event loops or simply
firing events when a pipe endpoint becomes active. In another words, asynchronous
...
...
@@ -895,10 +895,10 @@ notifications for daemon.
.. code-block:: lua
e = event.socket(0, function(e, status, nevents)
print('activity detected')
end)
e.cancel(e)
e = event.socket(0, function(e, status, nevents)
print('activity detected')
end)
e.cancel(e)
Scripting worker
^^^^^^^^^^^^^^^^
...
...
modules/daf/README.
md
→
modules/daf/README.
rst
View file @
5b80a057
File moved
modules/hints/README.rst
View file @
5b80a057
...
...
@@ -12,16 +12,16 @@ Examples
.. code-block:: lua
-- Load hints after iterator
modules = { 'hints > iterate' }
-- Load hints before rrcache, custom hosts file
modules = { ['hints < rrcache'] = 'hosts.custom' }
-- Add root hints
hints.root({
['j.root-servers.net.'] = { '2001:503:c27::2:30', '192.58.128.30' }
})
-- Set custom hint
hints['localhost'] = '127.0.0.1'
-- Load hints after iterator
modules = { 'hints > iterate' }
-- Load hints before rrcache, custom hosts file
modules = { ['hints < rrcache'] = 'hosts.custom' }
-- Add root hints
hints.root({
['j.root-servers.net.'] = { '2001:503:c27::2:30', '192.58.128.30' }
})
-- Set custom hint
hints['localhost'] = '127.0.0.1'
Properties
^^^^^^^^^^
...
...
@@ -64,16 +64,16 @@ Properties
.. code-block:: lua
> hints.root({
['l.root-servers.net.'] = '199.7.83.42',
['m.root-servers.net.'] = '202.12.27.33'
})
[l.root-servers.net.] => {
[1] => 199.7.83.42
}
[m.root-servers.net.] => {
[1] => 202.12.27.33
}
> hints.root({
['l.root-servers.net.'] = '199.7.83.42',
['m.root-servers.net.'] = '202.12.27.33'
})
[l.root-servers.net.] => {
[1] => 199.7.83.42
}
[m.root-servers.net.] => {
[1] => 202.12.27.33
}
.. tip:: A good rule of thumb is to select only a few fastest root hints. The server learns RTT and NS quality over time, and thus tries all servers available. You can help it by preselecting the candidates.
\ No newline at end of file
modules/http/README.rst
View file @
5b80a057
...
...
@@ -234,7 +234,7 @@ Dependencies
* `lua-http <https://github.com/daurnimator/lua-http>`_ available in LuaRocks
If you're installing via Homebrew on OS X, you need OpenSSL too.
If you're installing via Homebrew on OS X, you need OpenSSL too.
.. code-block:: bash
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment