Class: KubeMQ::PubSub::EventSendResult
- Inherits:
-
Object
- Object
- KubeMQ::PubSub::EventSendResult
- Defined in:
- lib/kubemq/pubsub/event_send_result.rb
Overview
Result returned after sending an event via KubeMQ::PubSubClient#send_event.
Check #sent to confirm the broker accepted the event. If sent is
false, inspect #error for the reason.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#id ⇒ String
readonly
The event identifier echoed back by the broker.
-
#sent ⇒ Boolean
readonly
trueif the broker accepted the event.
Instance Method Summary collapse
-
#initialize(id:, sent:, error: nil) ⇒ EventSendResult
constructor
A new instance of EventSendResult.
Constructor Details
#initialize(id:, sent:, error: nil) ⇒ EventSendResult
Returns a new instance of EventSendResult.
24 25 26 27 28 |
# File 'lib/kubemq/pubsub/event_send_result.rb', line 24 def initialize(id:, sent:, error: nil) @id = id @sent = sent @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
19 |
# File 'lib/kubemq/pubsub/event_send_result.rb', line 19 attr_reader :id, :sent, :error |
#id ⇒ String (readonly)
Returns the event identifier echoed back by the broker.
19 20 21 |
# File 'lib/kubemq/pubsub/event_send_result.rb', line 19 def id @id end |
#sent ⇒ Boolean (readonly)
Returns true if the broker accepted the event.
19 |
# File 'lib/kubemq/pubsub/event_send_result.rb', line 19 attr_reader :id, :sent, :error |