Class: Entrance::Publisher::Agent
- Inherits:
-
Object
- Object
- Entrance::Publisher::Agent
- Defined in:
- lib/entrance/publisher/agent.rb
Instance Method Summary collapse
-
#initialize(zk_path = "/doorkeepr/entrance", params = {}) ⇒ Agent
constructor
A new instance of Agent.
- #publish ⇒ Object
- #start ⇒ Object
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
#publish ⇒ Object
16 17 18 |
# File 'lib/entrance/publisher/agent.rb', line 16 def publish @publisher.report_up end |
#start ⇒ Object
12 13 14 15 |
# File 'lib/entrance/publisher/agent.rb', line 12 def start @publisher.start @publisher.report_up end |