Sha256: 4bb04cfee68f1eded91575a6cd46562cfb3eb31c1b7edbf5dad6dc2795676177
Contents?: true
Size: 1.04 KB
Versions: 25
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module Karafka # App class class App extend Setup::Dsl class << self # @return [Karafka::Routing::Builder] consumers builder instance alias def consumer_groups config .internal .routing .builder end # @return [Array<Karafka::Routing::SubscriptionGroup>] active subscription groups def subscription_groups consumer_groups .active .flat_map(&:subscription_groups) end # Just a nicer name for the consumer groups alias routes consumer_groups Status.instance_methods(false).each do |delegated| define_method(delegated) do App.config.internal.status.send(delegated) end end # Methods that should be delegated to Karafka module %i[ root env logger producer monitor pro? ].each do |delegated| define_method(delegated) do Karafka.send(delegated) end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems