Sha256: 76633dda572d025b949da5c068a3a7c463ef148a2f4b5aa094bf60c9af65accd
Contents?: true
Size: 922 Bytes
Versions: 4
Compression:
Stored size: 922 Bytes
Contents
# frozen_string_literal: true module Karafka module Web module Tracking module Consumers module Contracts # Contract for the job reporting details class Job < BaseContract configure required(:consumer) { |val| val.is_a?(String) } required(:consumer_group) { |val| val.is_a?(String) } required(:started_at) { |val| val.is_a?(Float) && val >= 0 } required(:topic) { |val| val.is_a?(String) } required(:partition) { |val| val.is_a?(Integer) && val >= 0 } required(:first_offset) { |val| val.is_a?(Integer) && val >= 0 } required(:last_offset) { |val| val.is_a?(Integer) && val >= 0 } required(:comitted_offset) { |val| val.is_a?(Integer) } required(:type) { |val| %w[consume revoked shutdown].include?(val) } end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems