dump Scan var

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-22 19:55:32 -05:00
parent a5a972e2f4
commit 5b99a88e06
3 changed files with 2 additions and 4 deletions

View File

@ -38,9 +38,7 @@ func readConfigFile() {
h.Delay = 5 * time.Second
h.lastpoll = time.Now()
h.Scan = func() {
h.pollHypervisor()
}
me.hypers = append(me.hypers, h)
log.Log(EVENT, "config new hypervisors", h.pb.Hostname)
}

View File

@ -58,6 +58,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
if tmp == "/writeconfig" {
writeConfigFile()
fmt.Fprintln(w, "OK")
return
}

View File

@ -35,7 +35,6 @@ type HyperT struct {
Dog *time.Ticker // the watchdog timer itself
lastpoll time.Time // the last time the hypervisor polled
killcount int
Scan func() // the function to run to scan the hypervisor
}
// the stuff that is needed for a hypervisor