Class: Karafka::Pro::Routing::Features::Multiplexing::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/karafka/pro/routing/features/multiplexing/config.rb

Overview

Multiplexing configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#active ⇒ Object Also known as: active?

Returns the value of attribute active

Returns:

  • (Object) —

    the current value of active



12
13
14
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 12

def active
  @active
end

#boot ⇒ Object

Returns the value of attribute boot

Returns:

  • (Object) —

    the current value of boot



12
13
14
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 12

def boot
  @boot
end

#max ⇒ Object

Returns the value of attribute max

Returns:

  • (Object) —

    the current value of max



12
13
14
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 12

def max
  @max
end

#min ⇒ Object

Returns the value of attribute min

Returns:

  • (Object) —

    the current value of min



12
13
14
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 12

def min
  @min
end

#scale_delay ⇒ Object

Returns the value of attribute scale_delay

Returns:

  • (Object) —

    the current value of scale_delay



12
13
14
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 12

def scale_delay
  @scale_delay
end

Instance Method Details

#dynamic? ⇒ Boolean

Returns true if we are allowed to upscale and downscale.

Returns:

  • (Boolean) —

    true if we are allowed to upscale and downscale



23
24
25
# File 'lib/karafka/pro/routing/features/multiplexing/config.rb', line 23

def dynamic?
  min < max
end