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") ⇒ 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"
  @config    = Nerve::Easy::Reporter.new zk_path:zk_path
  @publisher = Nerve::Reporter::Zookeeper.new @config
end

Instance Method Details

#publishObject



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

def publish
  @publisher.report_up
end

#startObject



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

def start
  @publisher.start
end