Sha256: 79b5157a1ec55ef7a2ee49b70e9b32620c93d59a4f8add1f61521c6ba4b24b94

Contents?: true

Size: 1.05 KB

Versions: 2

Compression:

Stored size: 1.05 KB

Contents

require 'hallmonitor/configuration'
require 'hallmonitor/dispatcher'
require 'hallmonitor/monitored'
require 'hallmonitor/event'
require 'hallmonitor/timed_event'
require 'hallmonitor/gauge_event'
require 'hallmonitor/outputter'
require 'hallmonitor/middleware'
require 'hallmonitor/railtie' if defined?(Rails)

# Top-level module, allows for configuration
module Hallmonitor
  class << self
    # @return {Hallmonitor::Configuration} instance
    def config
      @config ||= Hallmonitor::Configuration.new
    end

    # Method to configure Hallmonitor, takes a block and passes a
    # {Hallmonitor::Configuration} object in, which can be used to
    # set configuration options.
    def configure
      yield(config)
    end

    # Adds an outputter to Hallmonitor.  Whenever events are emitted
    # they will be sent to all registered outputters
    #
    # @param outputter [Outputter] An instance of an outputter
    # @note This delegates to {Dispatcher.add_outputter}
    def add_outputter(outputter)
      Dispatcher.add_outputter(outputter)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hallmonitor-5.2.0 lib/hallmonitor.rb
hallmonitor-5.1.0 lib/hallmonitor.rb