Module: Karafka::Routing::Features::InlineInsights::Topic
- Defined in:
- lib/karafka/routing/features/inline_insights/topic.rb
Overview
Routing topic inline insights API
Instance Method Summary collapse
- #inline_insights(active = false) ⇒ Object
-
#inline_insights? ⇒ Boolean
Are inline insights active.
-
#to_h ⇒ Hash
Topic setup hash.
Instance Method Details
#inline_insights(active = false) ⇒ Object
10 11 12 13 14 |
# File 'lib/karafka/routing/features/inline_insights/topic.rb', line 10 def inline_insights(active = false) @inline_insights ||= Config.new( active: active ) end |
#inline_insights? ⇒ Boolean
Returns Are inline insights active.
17 18 19 |
# File 'lib/karafka/routing/features/inline_insights/topic.rb', line 17 def inline_insights? inline_insights.active? end |
#to_h ⇒ Hash
Returns topic setup hash.
22 23 24 25 26 |
# File 'lib/karafka/routing/features/inline_insights/topic.rb', line 22 def to_h super.merge( inline_insights: inline_insights.to_h ).freeze end |