diff options
| author | Jeff Carr <[email protected]> | 2024-10-29 09:00:40 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-10-29 09:00:40 -0500 |
| commit | 8724a07b0d7cf3a3071f1192481ee33c0bfeeee0 (patch) | |
| tree | c262c6c7a9c62970ac1a10b557541fb658620d64 /http.go | |
| parent | c26699571d65178fe94390617d26055f8c1daf6f (diff) | |
function to dump all droplets
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 26 |
1 files changed, 6 insertions, 20 deletions
@@ -21,25 +21,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) { var route string route = cleanURL(r.URL.Path) - // is the cluster running what it should? - if route == "/droplets" { - for _, d := range me.cluster.Droplets { - var msg string - if d.StartState == pb.DropletState_ON { - msg = "(should be on)" - } - switch d.CurrentState { - case pb.DropletState_ON: - fmt.Fprintln(w, d.Hostname, "ON") - case pb.DropletState_OFF: - fmt.Fprintln(w, d.Hostname, msg) - default: - fmt.Fprintln(w, d.Hostname, "? state:", d.CurrentState, msg) - } - } - return - } - // show only what droplets should be running but are missing if route == "/missing" { var count int @@ -132,7 +113,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) { } if route == "/dumpdroplets" { - dumpDroplets(w) + dumpDroplets(w, false) + return + } + + if route == "/dumpdropletsfull" { + dumpDroplets(w, true) return } |
