Sha256: 24ee05a45c5f115fbe1398165fe782b915a1819951f2be0d518355ec500efcca

Contents?: true

Size: 661 Bytes

Versions: 8

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Routing
    module Features
      class ManualOffsetManagement < Base
        # Rules around manual offset management settings
        class Contract < Contracts::Base
          configure do |config|
            config.error_messages = YAML.safe_load(
              File.read(
                File.join(Karafka.gem_root, 'config', 'errors.yml')
              )
            ).fetch('en').fetch('validations').fetch('topic')
          end

          nested :manual_offset_management do
            required(:active) { |val| [true, false].include?(val) }
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
karafka-2.0.23 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.22 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.21 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.20 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.19 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.18 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.17 lib/karafka/routing/features/manual_offset_management/contract.rb
karafka-2.0.16 lib/karafka/routing/features/manual_offset_management/contract.rb