Class: Karafka::Web::Ui::Models::Health

Inherits:
Object
  • Object
show all
Defined in:
lib/karafka/web/ui/models/health.rb

Overview

Aggregated health data statistics representation

Class Method Summary collapse

Class Method Details

.current(state) ⇒ Hash

Returns has with aggregated statistics.

Parameters:

  • state (State)

    current system state

Returns:

  • (Hash)

    has with aggregated statistics



12
13
14
15
16
17
18
19
# File 'lib/karafka/web/ui/models/health.rb', line 12

def current(state)
  stats = {}

  fetch_topics_data(state, stats)
  fetch_rebalance_ages(state, stats)

  sort_structure(stats)
end