add /kill

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-12 22:16:52 -05:00
parent 206e5f4938
commit df85c52376
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"net/http"
"os"
"strings"
"go.wit.com/log"
@ -32,6 +33,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, j)
return
}
if tmp == "/kill" {
log.Warn("KILLED")
fmt.Fprintln(w, "KILLED")
os.Exit(-1)
return
}
if tmp == "/vms" {
s := poolHypervisor(hv)