Module: Hotwired
- Defined in:
- lib/hotwired.rb,
lib/hotwired/cli.rb,
lib/hotwired/log.rb,
lib/hotwired/core.rb,
lib/hotwired/snmp.rb,
lib/hotwired/db/db.rb,
lib/hotwired/model.rb,
lib/hotwired/config.rb,
lib/hotwired/version.rb,
lib/hotwired/db/model.rb
Defined Under Namespace
Classes: CLI, Config, Core, DB, HotwiredError, Logger, Model, SNMP
Constant Summary collapse
- Log =
Logger.new
- CONFIG =
Strada.new name: "hotwired", load: "false"
- CFG =
CONFIG.cfg
- VERSION =
"0.0.4"
Class Method Summary collapse
-
.new(opts = {}) ⇒ Object
实例化 Core 对象.
-
.poll(opts = {}) ⇒ Object
轮询 host 数据.
Class Method Details
.new(opts = {}) ⇒ Object
实例化 Core 对象
18 19 20 |
# File 'lib/hotwired/core.rb', line 18 def new(opts = {}) Core.new opts end |
.poll(opts = {}) ⇒ Object
轮询 host 数据
23 24 25 26 27 28 29 30 |
# File 'lib/hotwired/core.rb', line 23 def poll(opts = {}) host = opts.delete(:host) raise HotwiredError, "'host' not given" unless host hotwire = new(opts) result = hotwire.poll Resolv.getaddress(host) # 数据转储 hotwire.make_record result if result end |