summaryrefslogtreecommitdiff
path: root/dump.go
blob: 1e6a59628c359caad58a82c96af99c7077843685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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])
	}
}