Commit d2a7b2a3 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

modules/ketcd: added polling

parent 3fcc86cb
......@@ -39,11 +39,17 @@ function ketcd.config(conf)
if type(conf) == 'table' then
for k,v in pairs(conf) do options[k] = v end
-- create connection
local cli, err =
if err then
ketcd.cli = cli
-- schedule recurrent polling
-- @todo: the etcd has watch() API, but this requires
-- coroutines on socket operations
if ketcd.ev then event.cancel(ketcd.ev) end
ketcd.ev = event.recurrent(5 * sec, ketcd.reload)
return ketcd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment