Sha256: cfbc19db93d47bded92309ff6558f363ec257b41ffafa7b00331b5b197f54972

Contents?: true

Size: 1.06 KB

Versions: 18

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module Karafka
  module Setup
    # Configurators module is used to enclose all the external dependencies configurations
    # upon which Karafka depents
    class Configurators
      # Karafka has some components that it relies on (like Sidekiq)
      # We need to configure all of them only when the framework was set up.
      # Any class that descends from this one will be automatically invoked upon setup (after it)
      # @note This should be used only for internal Karafka dependencies configuration
      #   End users configuration should go to the after_init block
      # @example Configure an Example class
      #   class ExampleConfigurator < Base
      #     def setup
      #       ExampleClass.logger = Karafka.logger
      #       ExampleClass.redis = config.redis
      #     end
      #   end
      class Base
        # @param _config [Karafka::Config] config instance
        # This method needs to be implemented in a subclass
        def self.setup(_config)
          raise NotImplementedError
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
karafka-1.2.13 lib/karafka/setup/configurators/base.rb
karafka-1.2.12 lib/karafka/setup/configurators/base.rb
karafka-1.2.11 lib/karafka/setup/configurators/base.rb
karafka-1.2.10 lib/karafka/setup/configurators/base.rb
karafka-1.2.9 lib/karafka/setup/configurators/base.rb
karafka-1.2.8 lib/karafka/setup/configurators/base.rb
karafka-1.2.7 lib/karafka/setup/configurators/base.rb
karafka-1.2.6 lib/karafka/setup/configurators/base.rb
karafka-1.2.5 lib/karafka/setup/configurators/base.rb
karafka-1.2.4 lib/karafka/setup/configurators/base.rb
karafka-1.2.3 lib/karafka/setup/configurators/base.rb
karafka-1.2.2 lib/karafka/setup/configurators/base.rb
karafka-1.2.1 lib/karafka/setup/configurators/base.rb
karafka-1.2.0 lib/karafka/setup/configurators/base.rb
karafka-1.2.0.beta4 lib/karafka/setup/configurators/base.rb
karafka-1.2.0.beta3 lib/karafka/setup/configurators/base.rb
karafka-1.2.0.beta2 lib/karafka/setup/configurators/base.rb
karafka-1.2.0.beta1 lib/karafka/setup/configurators/base.rb