This commit is contained in:
henrygd
2026-04-19 21:44:21 -04:00
parent ea19ef6334
commit e71ffd4d2a
15 changed files with 136 additions and 113 deletions

View File

@@ -53,7 +53,6 @@ func NewHandlerRegistry() *HandlerRegistry {
registry.Register(common.GetSmartData, &GetSmartDataHandler{})
registry.Register(common.GetSystemdInfo, &GetSystemdInfoHandler{})
registry.Register(common.SyncNetworkProbes, &SyncNetworkProbesHandler{})
registry.Register(common.GetNetworkProbeResults, &GetNetworkProbeResultsHandler{})
return registry
}
@@ -222,14 +221,3 @@ func (h *SyncNetworkProbesHandler) Handle(hctx *HandlerContext) error {
slog.Info("network probes synced", "count", len(configs))
return hctx.SendResponse("ok", hctx.RequestID)
}
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// GetNetworkProbeResultsHandler handles probe results request from hub
type GetNetworkProbeResultsHandler struct{}
func (h *GetNetworkProbeResultsHandler) Handle(hctx *HandlerContext) error {
results := hctx.Agent.probeManager.GetResults()
return hctx.SendResponse(results, hctx.RequestID)
}