From 5b99a88e0607426e3651ef1526809c84ede8301a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 22 Oct 2024 19:55:32 -0500 Subject: [PATCH] dump Scan var Signed-off-by: Jeff Carr --- configfiles.go | 4 +--- http.go | 1 + structs.go | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configfiles.go b/configfiles.go index c633a6d..d9ba578 100644 --- a/configfiles.go +++ b/configfiles.go @@ -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) } diff --git a/http.go b/http.go index 961ca2b..cf6ad67 100644 --- a/http.go +++ b/http.go @@ -58,6 +58,7 @@ func okHandler(w http.ResponseWriter, r *http.Request) { if tmp == "/writeconfig" { writeConfigFile() + fmt.Fprintln(w, "OK") return } diff --git a/structs.go b/structs.go index 392238b..5e6201e 100644 --- a/structs.go +++ b/structs.go @@ -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