Sha256: 06ed38f8b9e16b2bc6fb5f1f16fc42c85db832c10b8afe3ea9d137839b3ed8e7
Contents?: true
Size: 743 Bytes
Versions: 4
Compression:
Stored size: 743 Bytes
Contents
require 'etcd' require 'etcdist/log' require 'etcdist/reader' require 'etcdist/writer' # The Etcdist name space module Etcdist Log.level = :info # Main entry point to read data from F/S and write into etcd. # # @param [String] dir The path to the data directory # @param [Hash] opts Options # @opts [String] :host IP address of the etcd server (default 127.0.0.1) # @opts [Fixnum] :port Port number of the etcd server (default 4001) 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) Log.info('finished successfully.') end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
etcdist-0.0.6 | lib/etcdist.rb |
etcdist-0.0.5 | lib/etcdist.rb |
etcdist-0.0.4 | lib/etcdist.rb |
etcdist-0.0.3 | lib/etcdist.rb |