Sha256: 8fe70a2c544f8e18f24e191d7bde2f7368bbb764cbf4ec37a10e1a118564614b

Contents?: true

Size: 675 Bytes

Versions: 7

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Routing
    module Features
      class Eofed < Base
        # Routing topic eofed API
        module Topic
          # @param active [Boolean] should the `#eofed` job run on eof
          def eofed(active = false)
            @eofed ||= Config.new(
              active: active
            )
          end

          # @return [Boolean] Are `#eofed` jobs active
          def eofed?
            eofed.active?
          end

          # @return [Hash] topic setup hash
          def to_h
            super.merge(
              eofed: eofed.to_h
            ).freeze
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
karafka-2.4.14 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.13 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.12 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.11 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.10 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.9 lib/karafka/routing/features/eofed/topic.rb
karafka-2.4.8 lib/karafka/routing/features/eofed/topic.rb