mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
feat(join): check cluster conditions before join
This commit is contained in:
@@ -224,7 +224,9 @@ func (ps *PeerServer) setClusterConfigHttpHandler(w http.ResponseWriter, req *ht
|
||||
func (ps *PeerServer) getMachinesHttpHandler(w http.ResponseWriter, req *http.Request) {
|
||||
machines := make([]*machineMessage, 0)
|
||||
for _, name := range ps.registry.Names() {
|
||||
machines = append(machines, ps.getMachineMessage(name))
|
||||
if msg := ps.getMachineMessage(name); msg != nil {
|
||||
machines = append(machines, msg)
|
||||
}
|
||||
}
|
||||
json.NewEncoder(w).Encode(&machines)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user