class Deimos::Utils::LagReporter::ConsumerGroup

Class that has a list of topics

Attributes

id[RW]

@return [String]

topics[RW]

@return [Hash<String, Topic>]

Public Class Methods

new(id) click to toggle source

@param id [String]

# File lib/deimos/utils/lag_reporter.rb, line 20
def initialize(id)
  self.id = id
  self.topics = {}
end

Public Instance Methods

assign_current_offset(topic, partition, offset) click to toggle source

@param topic [String] @param partition [Integer] @param offset [Integer]

# File lib/deimos/utils/lag_reporter.rb, line 35
def assign_current_offset(topic, partition, offset)
  self.topics[topic.to_s] ||= Topic.new(topic, self)
  self.topics[topic.to_s].assign_current_offset(partition, offset)
end
report_lag(topic, partition) click to toggle source

@param topic [String] @param partition [Integer]

# File lib/deimos/utils/lag_reporter.rb, line 27
def report_lag(topic, partition)
  self.topics[topic.to_s] ||= Topic.new(topic, self)
  self.topics[topic.to_s].report_lag(partition)
end