add pprof
This commit is contained in:
1
main.go
1
main.go
@@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
_ "net/http/pprof"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
@@ -64,6 +64,7 @@ func (h *Handler) VmDelete(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.WriteHeader(http.StatusInternalServerError)
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
fmt.Fprintf(w, "Delete Request unsuccessful %s\n", err)
|
fmt.Fprintf(w, "Delete Request unsuccessful %s\n", err)
|
||||||
} else {
|
} else {
|
||||||
|
h.Logger.Debug("Processed VM Deletion event successfully")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
// TODO - return some JSON
|
// TODO - return some JSON
|
||||||
fmt.Fprintf(w, "Processed VM Deletion event successfully")
|
fmt.Fprintf(w, "Processed VM Deletion event successfully")
|
||||||
|
Reference in New Issue
Block a user