pub struct StateSnapshot {
pub pc_id: String,
pub online: bool,
pub vpn: String,
pub checks: Vec<Check>,
pub agent_version: String,
pub target_version: String,
}Expand description
Full state bundle — the SPA renders this verbatim on the Health tab. SPEC §2.12.8’s complete-conversation example pins the shape:
{"pc_id":"PC1234","online":true,"vpn":"connected",
"checks":[{"name":"bitlocker","status":"ok"}],
"agent_version":"0.4.0","target_version":"0.4.0"}Fields§
§pc_id: StringAgent’s pc_id — duplicated here from the handshake so the
SPA can refresh the snapshot independently without
re-handshaking.
online: booltrue when the agent currently has a NATS connection open.
Distinct from the OS-level network state — operators care
about “is fleet management reachable” specifically.
vpn: StringVPN posture. Free-form string today ("connected" /
"disconnected" / "unknown" / a vendor-specific status)
because SPEC §2.1’s compliance checks are
site-specific. Future SPEC version may tighten this into an
enum.
checks: Vec<Check>Ordered list of compliance check results. Each Check
item is rendered as a row on the Health tab; failing rows
surface a “修復する” button per SPEC §2.1.
agent_version: StringCurrently-running agent binary version
(CARGO_PKG_VERSION). Same value as
super::system::VersionResult::agent_version.
target_version: StringVersion the agent self-updater is targeting. When this
differs from agent_version, the SPA shows “restart pending”
on the Health tab.
Trait Implementations§
Source§impl Clone for StateSnapshot
impl Clone for StateSnapshot
Source§fn clone(&self) -> StateSnapshot
fn clone(&self) -> StateSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StateSnapshot
impl Debug for StateSnapshot
Source§impl<'de> Deserialize<'de> for StateSnapshot
impl<'de> Deserialize<'de> for StateSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for StateSnapshot
impl JsonSchema for StateSnapshot
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more