Class: Entrance::Publisher::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/entrance/publisher/agent.rb

Instance Method Summary collapse

Constructor Details

#initialize(zk_path = "/doorkeepr/entrance", params = {}) ⇒ Agent

Returns a new instance of Agent.



8
9
10
11
# File 'lib/entrance/publisher/agent.rb', line 8

def initialize zk_path="/doorkeepr/entrance",params={}
  @config    = Nerve::Easy::Reporter.new params.merge(zk_path:zk_path)
  @publisher = Nerve::Reporter::Zookeeper.new @config
end

Instance Method Details

#publishObject



16
17
18
# File 'lib/entrance/publisher/agent.rb', line 16

def publish
  @publisher.report_up
end

#startObject



12
13
14
15
# File 'lib/entrance/publisher/agent.rb', line 12

def start
  @publisher.start
  @publisher.report_up
end