feat: generate HIP reports through OpenConnect callbacks

This commit is contained in:
Kevin Yue committed 2026-10-02 01:38:20 +08:00
1 parent 05814e9da7
commit b750cfbf16
46 files changed
+2511 -1184

No files matched your search

+7
View File
@@ -39,6 +39,7 @@ pub(crate) struct WsServerContext {
dispatcher: Arc<RequestDispatcher>,
state: Mutex<ServiceState>,
handshake_slots: Arc<Semaphore>,
pub(crate) hip_previews: crate::hip_preview::HipPreviews,
}
impl WsServerContext {
@@ -58,6 +59,7 @@ impl WsServerContext {
connections: HashMap::new(),
}),
handshake_slots: Arc::new(Semaphore::new(16)),
hip_previews: crate::hip_preview::HipPreviews::new(),
}
}
@@ -65,6 +67,10 @@ impl WsServerContext {
self.product_version
}
pub async fn host_identity(&self) -> HostIdentity {
self.state.lock().await.snapshot.host_info.host_identity.clone()
}
pub fn registry(&self) -> &Arc<SessionRegistry> {
&self.registry
}
@@ -243,6 +249,7 @@ impl WsServer {
info!("WS server cancelled");
}
}
self.ctx.hip_previews.shutdown().await;
let _ = shutdown_tx.send(()).await;
}