Persist per-host scan results and expose hosts endpoint.

Store checked hosts for each scan and add API to fetch host-level up/down probe results.

Made-with: Cursor
This commit is contained in:
Andrey Lutsenko
2026-04-09 21:51:35 +10:00
parent 43cb339605
commit 9afbbbb762
6 changed files with 127 additions and 3 deletions
+5
View File
@@ -70,6 +70,11 @@ func (r *Runner) run(job ScanJob) {
defer wg.Done()
for ip := range workCh {
isUp := probeHost(ip, job.Options.PingTimeoutMS)
_ = r.store.SaveHostResult(job.ID, HostResult{
IP: ip,
IsUp: isUp,
CheckedAt: time.Now().UTC(),
})
mu.Lock()
done++