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:
@@ -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++
|
||||
|
||||
Reference in New Issue
Block a user