Sha256: 99fedbde9742109877c0c940939684972b455b4f0a674094ae9788ee2abcc5fd

Contents?: true

Size: 1.97 KB

Versions: 6

Compression:

Stored size: 1.97 KB

Contents

require "queue_bus/version"

module QueueBus

  autoload :Application,      'queue_bus/application'
  autoload :Config,           'queue_bus/config'
  autoload :Dispatch,         'queue_bus/dispatch'
  autoload :Dispatchers,      'queue_bus/dispatchers'
  autoload :Driver,           'queue_bus/driver'
  autoload :Heartbeat,        'queue_bus/heartbeat'
  autoload :Local,            'queue_bus/local'
  autoload :Matcher,          'queue_bus/matcher'
  autoload :Publishing,       'queue_bus/publishing'
  autoload :Publisher,        'queue_bus/publisher'
  autoload :Rider,            'queue_bus/rider'
  autoload :Subscriber,       'queue_bus/subscriber'
  autoload :Subscription,     'queue_bus/subscription'
  autoload :SubscriptionList, 'queue_bus/subscription_list'
  autoload :TaskManager,      'queue_bus/task_manager'
  autoload :Util,             'queue_bus/util'
  autoload :Worker,           'queue_bus/worker'

  module Adapters
    autoload :Base,           'queue_bus/adapters/base'
    autoload :Data,           'queue_bus/adapters/data'
  end

  class << self

    include Publishing
    extend Forwardable

    def_delegators :config, :default_app_key=, :default_app_key,
                            :default_queue=, :default_queue,
                            :local_mode=, :local_mode,
                            :before_publish=, :before_publish_callback,
                            :logger=, :logger, :log_application, :log_worker,
                            :hostname=, :hostname,
                            :adapter=, :adapter,
                            :incoming_queue=, :incoming_queue,
                            :redis

    def_delegators :_dispatchers, :dispatch, :dispatchers, :dispatcher_by_key, :dispatcher_execute

    protected

    def reset
      # used by tests
      @config = nil
      @_dispatchers = nil
    end

    def config
      @config ||= ::QueueBus::Config.new
    end

    def _dispatchers
      @_dispatchers ||= ::QueueBus::Dispatchers.new
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
queue-bus-0.5.5 lib/queue-bus.rb
queue-bus-0.5.4 lib/queue-bus.rb
queue-bus-0.5.3 lib/queue-bus.rb
queue-bus-0.5.2 lib/queue-bus.rb
queue-bus-0.5.1 lib/queue-bus.rb
queue-bus-0.5.0 lib/queue-bus.rb