Sha256: 17d0aa93019f63648659f3024a18b03a092b17b0ea1a13737c8243a95b9a2cef

Contents?: true

Size: 1.39 KB

Versions: 13

Compression:

Stored size: 1.39 KB

Contents

# frozen_string_literal: true

require 'hermes_messenger_of_the_gods/version'

require 'hermes_messenger_of_the_gods/exceptions'
require 'hermes_messenger_of_the_gods/configuration'

require 'hermes_messenger_of_the_gods/logging_helpers'
require 'hermes_messenger_of_the_gods/endpoint_builder'

require 'hermes_messenger_of_the_gods/concerns/base'
require 'hermes_messenger_of_the_gods/concerns/message'
require 'hermes_messenger_of_the_gods/concerns/worker'
require 'hermes_messenger_of_the_gods/concerns/mono_message'
require 'hermes_messenger_of_the_gods/concerns/grpc_protobuf'

require 'hermes_messenger_of_the_gods/endpoints'

require 'hermes_messenger_of_the_gods/output/basic'

module HermesMessengerOfTheGods
  class << self
    def configuration
      @configuration ||= Configuration.new
    end

    def configure
      yield(configuration) if block_given?
      configuration
    end
    alias config configure

    def async_dispatches_in_progress
      @async_dispatches_in_progress ||= 0
    end

    def increment_async_dispatches_in_progress
      monitor.synchronize do
        self.async_dispatches_in_progress += 1
      end
    end

    def decrement_async_dispatches_in_progress
      monitor.synchronize do
        self.async_dispatches_in_progress -= 1
      end
    end

    private

    attr_writer :async_dispatches_in_progress

    def monitor
      @monitor ||= Monitor.new
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hermes_messenger_of_the_gods-2.4.2 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.4.1 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.4.0.pre2 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.4.0.pre1 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.3.4 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.3.3 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.3.2 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.3.1 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.3.0 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.2.0 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.1.1 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.1.0 lib/hermes_messenger_of_the_gods.rb
hermes_messenger_of_the_gods-2.0.0 lib/hermes_messenger_of_the_gods.rb