summaryrefslogtreecommitdiff
path: root/dump.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-27 02:55:08 -0500
committerJeff Carr <[email protected]>2024-10-27 02:55:08 -0500
commit71f83d400048f6d4219793a76a3ffce16b8c63d8 (patch)
tree5e1935b34d87cf27adfce3cb58140cb1059b7e87 /dump.go
parentd0767eb9843fcdb9ab0e73200d8a9516e28c200c (diff)
prepare to validate spice ports
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'dump.go')
-rw-r--r--dump.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/dump.go b/dump.go
new file mode 100644
index 0000000..1e6a596
--- /dev/null
+++ b/dump.go
@@ -0,0 +1,22 @@
+package main
+
+import (
+ "fmt"
+ "net/http"
+)
+
+/*
+ debugging code to see the state of the
+ cluster via http
+*/
+
+func dumpCluster(w http.ResponseWriter) {
+ umap, macs := safeValidateDroplets(me.cluster)
+ for u, hostname := range umap {
+ fmt.Fprintln(w, "uuid:", u, "hostname:", hostname)
+ }
+
+ for mac, uuid := range macs {
+ fmt.Fprintln(w, "mac:", mac, "uuid", uuid, "hostname:", umap[uuid])
+ }
+}