Class: KubeMQ::PubSub::EventStoreResult
- Inherits:
-
Object
- Object
- KubeMQ::PubSub::EventStoreResult
- Defined in:
- lib/kubemq/pubsub/event_store_result.rb
Overview
Result returned after sending a durable event via KubeMQ::PubSubClient#send_event_store or KubeMQ::PubSub::EventStoreSender#publish.
Check #sent to confirm the broker persisted 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 persisted the event.
Instance Method Summary collapse
-
#initialize(id:, sent:, error: nil) ⇒ EventStoreResult
constructor
A new instance of EventStoreResult.
Constructor Details
#initialize(id:, sent:, error: nil) ⇒ EventStoreResult
Returns a new instance of EventStoreResult.
26 27 28 29 30 |
# File 'lib/kubemq/pubsub/event_store_result.rb', line 26 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.
21 |
# File 'lib/kubemq/pubsub/event_store_result.rb', line 21 attr_reader :id, :sent, :error |
#id ⇒ String (readonly)
Returns the event identifier echoed back by the broker.
21 22 23 |
# File 'lib/kubemq/pubsub/event_store_result.rb', line 21 def id @id end |
#sent ⇒ Boolean (readonly)
Returns true if the broker persisted the event.
21 |
# File 'lib/kubemq/pubsub/event_store_result.rb', line 21 attr_reader :id, :sent, :error |