Sha256: c1b2417c33ff3400d0ca5d768b4bf3297877d76916ac89257afe231e24bd2dea

Contents?: true

Size: 621 Bytes

Versions: 98

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

module Karafka
  module Contracts
    # Base contract for all Karafka contracts
    class Base < ::Karafka::Core::Contractable::Contract
      # @param data [Hash] data for validation
      # @return [Boolean] true if all good
      # @raise [Errors::InvalidConfigurationError] invalid configuration error
      # @note We use contracts only in the config validation context, so no need to add support
      #   for multiple error classes. It will be added when it will be needed.
      def validate!(data)
        super(data, Errors::InvalidConfigurationError)
      end
    end
  end
end

Version data entries

98 entries across 98 versions & 1 rubygems

Version Path
karafka-2.0.14 lib/karafka/contracts/base.rb
karafka-2.0.13 lib/karafka/contracts/base.rb
karafka-2.0.12 lib/karafka/contracts/base.rb
karafka-2.0.11 lib/karafka/contracts/base.rb
karafka-2.0.10 lib/karafka/contracts/base.rb
karafka-2.0.9 lib/karafka/contracts/base.rb
karafka-2.0.8 lib/karafka/contracts/base.rb
karafka-2.0.7 lib/karafka/contracts/base.rb
karafka-2.0.6 lib/karafka/contracts/base.rb
karafka-2.0.5 lib/karafka/contracts/base.rb
karafka-2.0.4 lib/karafka/contracts/base.rb
karafka-2.0.3 lib/karafka/contracts/base.rb
karafka-2.0.2 lib/karafka/contracts/base.rb
karafka-2.0.1 lib/karafka/contracts/base.rb
karafka-2.0.0 lib/karafka/contracts/base.rb
karafka-2.0.0.rc6 lib/karafka/contracts/base.rb
karafka-2.0.0.rc5 lib/karafka/contracts/base.rb
karafka-2.0.0.rc4 lib/karafka/contracts/base.rb