Class: Karafka::Web::Ui::Models::Metrics::Topics

Inherits:
Lib::HashProxy show all
Defined in:
lib/karafka/web/ui/models/metrics/topics.rb

Overview

Representation of topics historical metrics based on the aggregated metrics data We do some pre-processing to align and normalize all the data

Instance Method Summary collapse

Methods inherited from Lib::HashProxy

#method_missing, #respond_to_missing?, #to_h

Constructor Details

#initialize(consumers_groups) ⇒ Topics

Returns a new instance of Topics.

Parameters:

  • consumers_groups (Hash)

    historical metrics for consumers groups



12
13
14
15
16
# File 'lib/karafka/web/ui/models/metrics/topics.rb', line 12

def initialize(consumers_groups)
  aggregate_topics_data(consumers_groups)
    .tap { |topics_metrics| nulify_gaps(topics_metrics) }
    .then { |topics_metrics| super(topics_metrics) }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Karafka::Web::Ui::Lib::HashProxy