Class: HermesAgent::Client::Entities::HealthDetails
- Inherits:
-
HermesAgent::Client::Entity
- Object
- HermesAgent::Client::Entity
- HermesAgent::Client::Entities::HealthDetails
- Defined in:
- lib/hermes_agent/client/entities/health.rb
Overview
The result of a detailed server health check (/health/detailed).
Field readers are best-effort; HermesAgent::Client::Entity#to_h remains the source of truth.
Instance Method Summary collapse
-
#active_agents ⇒ Integer?
The number of agents currently running on the server.
-
#exit_reason ⇒ String?
The reason the gateway exited, or
nilwhile it is running. -
#gateway_state ⇒ String?
The gateway's lifecycle state, e.g.
-
#pid ⇒ Integer?
The process id of the running gateway.
-
#platform ⇒ String?
The platform identifier, e.g.
-
#platforms ⇒ Hash{String => PlatformStatus}?
The per-platform connection state, keyed by platform name (e.g.
"api_server"), each value wrapped in a PlatformStatus. -
#status ⇒ String?
The reported health status, e.g.
-
#updated_at ⇒ String?
When this health snapshot was produced (ISO-8601 timestamp string).
Methods inherited from HermesAgent::Client::Entity
Instance Method Details
#active_agents ⇒ Integer?
The number of agents currently running on the server.
110 111 112 |
# File 'lib/hermes_agent/client/entities/health.rb', line 110 def active_agents self["active_agents"] end |
#exit_reason ⇒ String?
The reason the gateway exited, or nil while it is running.
118 119 120 |
# File 'lib/hermes_agent/client/entities/health.rb', line 118 def exit_reason self["exit_reason"] end |
#gateway_state ⇒ String?
The gateway's lifecycle state, e.g. "running".
89 90 91 |
# File 'lib/hermes_agent/client/entities/health.rb', line 89 def gateway_state self["gateway_state"] end |
#pid ⇒ Integer?
The process id of the running gateway.
134 135 136 |
# File 'lib/hermes_agent/client/entities/health.rb', line 134 def pid self["pid"] end |
#platform ⇒ String?
The platform identifier, e.g. "hermes-agent".
81 82 83 |
# File 'lib/hermes_agent/client/entities/health.rb', line 81 def platform self["platform"] end |
#platforms ⇒ Hash{String => PlatformStatus}?
The per-platform connection state, keyed by platform name (e.g.
"api_server"), each value wrapped in a PlatformStatus. Returns
nil when the field is absent.
99 100 101 102 103 104 |
# File 'lib/hermes_agent/client/entities/health.rb', line 99 def platforms raw = self["platforms"] return nil unless raw.is_a?(::Hash) raw.transform_values { |value| PlatformStatus.new(value) } end |
#status ⇒ String?
The reported health status, e.g. "ok".
73 74 75 |
# File 'lib/hermes_agent/client/entities/health.rb', line 73 def status self["status"] end |
#updated_at ⇒ String?
When this health snapshot was produced (ISO-8601 timestamp string).
126 127 128 |
# File 'lib/hermes_agent/client/entities/health.rb', line 126 def updated_at self["updated_at"] end |