class WaterDrop::Producer::Status
Producer
lifecycle status object representation
Constants
- LIFECYCLE
-
States in which the producer can be
Public Class Methods
Source
# File lib/waterdrop/producer/status.rb, line 20 def initialize @current = LIFECYCLE.first end
Creates a new instance of status with the initial state @return [Status]
Public Instance Methods
Source
# File lib/waterdrop/producer/status.rb, line 28 def active? connected? || configured? end
@return [Boolean] true if producer is in a active state. Active means, that we can start
sending messages. Actives states are connected (connection established) or configured, which means, that producer is configured, but connection with Kafka is not yet established.
Source
# File lib/waterdrop/producer/status.rb, line 33 def to_s @current.to_s end
@return [String] current status as a string