Class: Tempest::Jetstream::StreamStatus
- Inherits:
-
Data
- Object
- Data
- Tempest::Jetstream::StreamStatus
- Defined in:
- lib/tempest/jetstream/stream_manager.rb
Overview
Lifecycle status emitted alongside Event/StreamError on the same on_event callback so the REPL can render “– disconnected” / “– reconnecting” / “– live” lines without coupling to the manager’s internals. ‘state` is one of :disconnected | :reconnecting | :live | :gapped. `reason` is :closed | :error for :disconnected. `error` is the underlying exception when reason == :error. `since` is the disconnect time when state == :gapped.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(state:, reason: nil, error: nil, since: nil) ⇒ StreamStatus
constructor
A new instance of StreamStatus.
Constructor Details
#initialize(state:, reason: nil, error: nil, since: nil) ⇒ StreamStatus
Returns a new instance of StreamStatus.
263 264 265 |
# File 'lib/tempest/jetstream/stream_manager.rb', line 263 def initialize(state:, reason: nil, error: nil, since: nil) super end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error
262 263 264 |
# File 'lib/tempest/jetstream/stream_manager.rb', line 262 def error @error end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
262 263 264 |
# File 'lib/tempest/jetstream/stream_manager.rb', line 262 def reason @reason end |
#since ⇒ Object (readonly)
Returns the value of attribute since
262 263 264 |
# File 'lib/tempest/jetstream/stream_manager.rb', line 262 def since @since end |
#state ⇒ Object (readonly)
Returns the value of attribute state
262 263 264 |
# File 'lib/tempest/jetstream/stream_manager.rb', line 262 def state @state end |