summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-11 04:02:30 -0500
committerJeff Carr <[email protected]>2025-03-11 04:02:30 -0500
commit8517dbc948baa456267f8c11a7cceb4cbcb3363e (patch)
tree07b6c3bb9a3d7d4dd85fdc508691ba09b9029853 /http.go
parentd2d04da1228d36cfddc0cda357a2037ea7897345 (diff)
try to get events & hypervisors protobufs
Diffstat (limited to 'http.go')
-rw-r--r--http.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/http.go b/http.go
index 73dfe0c..861949b 100644
--- a/http.go
+++ b/http.go
@@ -145,6 +145,32 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
+ if route == "/HypervisorsPB" {
+ pb := me.cluster.GetHypervisorsPB()
+ data, err := pb.Marshal()
+ if err != nil {
+ log.Info("hypervisors marshal failed", err)
+ fmt.Fprintln(w, "hypervisors marshal failed", err)
+ return
+ }
+ w.Write(data)
+ // fmt.Fprintln("droplet marshal failed", err)
+ return
+ }
+
+ if route == "/EventsPB" {
+ pb := me.cluster.GetEventsPB()
+ data, err := pb.Marshal()
+ if err != nil {
+ log.Info("events marshal failed", err)
+ fmt.Fprintln(w, "events marshal failed", err)
+ return
+ }
+ w.Write(data)
+ // fmt.Fprintln("droplet marshal failed", err)
+ return
+ }
+
if route == "/dumpdropletsfull" {
dumpDroplets(w, true)
return