class Liebre::Bridge::ChannelBuilder
Constants
- DEFAULT_PREFETCH
Attributes
connections[R]
opts[R]
Public Class Methods
new(connections, opts)
click to toggle source
# File lib/liebre/bridge/channel_builder.rb, line 7 def initialize connections, opts @connections = connections @opts = opts end
Public Instance Methods
call()
click to toggle source
# File lib/liebre/bridge/channel_builder.rb, line 12 def call connection.open_channel.tap do |channel| channel.set_prefetch(prefetch_count) end end
Private Instance Methods
conn_name()
click to toggle source
# File lib/liebre/bridge/channel_builder.rb, line 24 def conn_name opts.fetch(:connection) end
connection()
click to toggle source
# File lib/liebre/bridge/channel_builder.rb, line 20 def connection connections.fetch(conn_name) end
prefetch_count()
click to toggle source
# File lib/liebre/bridge/channel_builder.rb, line 28 def prefetch_count opts.fetch(:prefetch_count, DEFAULT_PREFETCH) end