feat: schedule nonblocking Windows HIP patch checks

This commit is contained in:
Kevin Yue committed 2026-11-18 13:56:12 +08:00
1 parent bde11186f8
commit 5e7e343def
13 files changed
+318 -19

No files matched your search

+15
View File
@@ -45,3 +45,18 @@ mod tests {
assert_eq!(serde_json::from_value::<HipSource>(json).unwrap(), source);
}
}
/// Collection metadata for the exact XML returned by a generated preview.
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct HipReport {
pub xml: String,
pub windows_updates: Option<WindowsUpdateStatus>,
}
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, Type)]
#[serde(rename_all = "camelCase")]
pub struct WindowsUpdateStatus {
/// Present only when this report includes a completed local patch observation.
pub checked_at: Option<u64>,
}
+2
View File
@@ -424,6 +424,8 @@ pub struct UpdateLogLevelRequest(pub String);
#[derive(Debug, Deserialize, Serialize)]
pub enum WsRequest {
SetTunnelStatisticsEnabled { enabled: bool },
SetWindowsPatchInterest { enabled: bool },
RefreshWindowsPatches { after: Option<u64> },
Connect(Box<ConnectRequest>),
Disconnect(DisconnectRequest),
StopNonTunnelAttachment { connection_id: uuid::Uuid },
@@ -55,6 +55,8 @@ pub enum ServiceResult {
offset: usize,
xml: String,
complete: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
windows_updates: Option<crate::hip::WindowsUpdateStatus>,
},
HipApprovalStatus(HipApprovalStatus),
NoSubmittedHipReport,