Sha256: 55f1a9e080c4e7145a1f46729e010ea394852554cf1f6997f0149f1659111100

Contents?: true

Size: 797 Bytes

Versions: 18

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Callbacks
    # Additional configuration required to store procs that we will execute upon callback trigger
    module Config
      # Builds up internal callback accumulators
      # @param klass [Class] Class that we extend with callback config
      def self.extended(klass)
        # option internal [Hash] - optional - internal karafka configuration settings that should
        #   never be changed by users directly
        klass.setting :callbacks do
          Callbacks::TYPES.each do |callback_type|
            # option [Array<Proc>] an array of blocks that will be executed at a given moment
            #   depending on the callback type
            setting callback_type, []
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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