Example #1
0
func read_peers(fail bool) {
	p, err := glustercli.PoolList()
	if err != nil {
		if fail {
			log.Fatal("Peers list failed", err)
		}
	}
	Peers = p
}
Example #2
0
func loadPeers(fail bool) {
	p, err := glustercli.PoolList()
	if err != nil {
		if fail {
			log.Fatal("Peers list failed", err)
		}
	}
	PeersList = p

	for _, peer := range PeersList {
		if peer.Hostname == "localhost" {
			MyUUID = peer.Id
			break
		}
	}
}