Class: Pgoutput::Client::RunnerState
- Inherits:
-
RunnerStateData
- Object
- Data
- RunnerStateData
- Pgoutput::Client::RunnerState
- Defined in:
- lib/pgoutput/client/state.rb
Overview
Immutable operational snapshot for a Runner.
‘RunnerState` is intentionally small and transport-focused. It exposes connection, feedback, keepalive, and retry state without claiming anything about downstream processing, sink delivery, or business-level consumption.
Instance Attribute Summary collapse
-
#connected ⇒ Boolean
readonly
whether an active replication stream exists.
-
#last_error ⇒ String?
readonly
last transport error message.
-
#last_feedback_lsn ⇒ String?
readonly
latest downstream-acknowledged WAL position used for flushed/applied feedback.
-
#last_keepalive_at ⇒ Time?
readonly
last time a primary keepalive was observed.
-
#last_received_lsn ⇒ String?
readonly
latest WAL position received from PostgreSQL.
-
#reconnect_attempts ⇒ Integer
readonly
reconnect attempts used by the current/last run.
-
#running ⇒ Boolean
readonly
whether the runner is inside its streaming loop.
-
#stop_requested ⇒ Boolean
readonly
whether graceful stop was requested.
Instance Method Summary collapse
-
#stopped? ⇒ Boolean
Whether the runner currently has no active stream.
Instance Attribute Details
#connected ⇒ Boolean (readonly)
whether an active replication stream exists
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def connected @connected end |
#last_error ⇒ String? (readonly)
last transport error message
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def last_error @last_error end |
#last_feedback_lsn ⇒ String? (readonly)
latest downstream-acknowledged WAL position used for flushed/applied feedback
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def last_feedback_lsn @last_feedback_lsn end |
#last_keepalive_at ⇒ Time? (readonly)
last time a primary keepalive was observed
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def last_keepalive_at @last_keepalive_at end |
#last_received_lsn ⇒ String? (readonly)
latest WAL position received from PostgreSQL
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def last_received_lsn @last_received_lsn end |
#reconnect_attempts ⇒ Integer (readonly)
reconnect attempts used by the current/last run
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def reconnect_attempts @reconnect_attempts end |
#running ⇒ Boolean (readonly)
whether the runner is inside its streaming loop
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def running @running end |
#stop_requested ⇒ Boolean (readonly)
whether graceful stop was requested
32 33 34 |
# File 'lib/pgoutput/client/state.rb', line 32 def stop_requested @stop_requested end |
Instance Method Details
#stopped? ⇒ Boolean
Whether the runner currently has no active stream.
36 37 38 |
# File 'lib/pgoutput/client/state.rb', line 36 def stopped? !running end |