Class: Rodent::Goliath::Plugin
- Inherits:
-
Object
- Object
- Rodent::Goliath::Plugin
- Defined in:
- lib/rodent/goliath/plugin.rb
Instance Method Summary collapse
-
#initialize(address, port, config, status, logger) ⇒ Plugin
constructor
A new instance of Plugin.
- #run(connection_string = 'amqp://guest:guest@localhost', pool_size = 50) ⇒ Object
Constructor Details
#initialize(address, port, config, status, logger) ⇒ Plugin
Returns a new instance of Plugin.
8 9 10 11 12 13 |
# File 'lib/rodent/goliath/plugin.rb', line 8 def initialize(address, port, config, status, logger) @port = port @status = status @config = config @logger = logger end |
Instance Method Details
#run(connection_string = 'amqp://guest:guest@localhost', pool_size = 50) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/rodent/goliath/plugin.rb', line 15 def run(connection_string = 'amqp://guest:guest@localhost', pool_size = 50) @config['amqp'] = AMQP.connect(connection_string) @config['channels'] = EM::Synchrony::ConnectionPool.new(size: pool_size) do AMQP::Channel.new(@config['amqp']) end end |