Module: Etcdist
- Defined in:
- lib/etcdist.rb,
lib/etcdist/log.rb,
lib/etcdist/reader.rb,
lib/etcdist/writer.rb,
lib/etcdist/version.rb
Overview
The Etcdist name space
Defined Under Namespace
Constant Summary collapse
- VERSION =
'0.0.7'
Class Method Summary collapse
-
.execute(dir, opts = {}) ⇒ Object
Main entry point to read data from F/S and write into etcd.
Class Method Details
.execute(dir, opts = {}) ⇒ Object
Main entry point to read data from F/S and write into etcd.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/etcdist.rb', line 16 def self.execute(dir, opts = {}) etcd = Etcd::Client.new(opts) reader = Etcdist::Reader.new(dir) writer = Etcdist::Writer.new(etcd, opts) Log.info("using etcd host at: #{etcd.host}:#{etcd.port}") writer.write(reader.read) writer.delete_absent_directories(reader.all_dirs) Log.info('finished successfully.') end |