feed back the protobuf

This commit is contained in:
Jeff Carr 2025-03-10 08:13:16 -05:00
parent 9449b5699e
commit 89f870f1f9
1 changed files with 13 additions and 0 deletions

13
http.go
View File

@ -132,6 +132,19 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
return
}
if route == "/DropletsPB" {
pb := me.cluster.GetDropletsPB()
data, err := pb.Marshal()
if err != nil {
log.Info("droplet marshal failed", err)
fmt.Fprintln(w, "droplet marshal failed", err)
return
}
w.Write(data)
// fmt.Fprintln("droplet marshal failed", err)
return
}
if route == "/dumpdropletsfull" {
dumpDroplets(w, true)
return