完成consul新增注释

This commit is contained in:
chenjiekun
2021-07-20 15:52:04 +08:00
parent 5ea1cfb755
commit 9e0aff29a3
17 changed files with 83 additions and 77 deletions

View File

@@ -77,7 +77,7 @@ package health_check_http
// from: c.id,
// }
// c.ch <- n
// c.nodes[checkNode.Id()] = n
// c.nodes[checkNode.ID()] = n
// return nil
//}
//

View File

@@ -57,7 +57,7 @@ func (h *HttpCheck) doCheckLoop() {
if _, ok := nodes[node.agentId]; !ok {
nodes[node.agentId] = make(map[string]*checkNode)
}
nodes[node.agentId][node.node.Id()] = node
nodes[node.agentId][node.node.ID()] = node
}
}
case id, ok := <-h.delCh:
@@ -130,7 +130,7 @@ func (h *HttpCheck) check(nodes map[string]map[string]*checkNode) map[string]map
}
for _, n := range ns {
n.node.Up()
delete(nodes[n.agentId], n.node.Id())
delete(nodes[n.agentId], n.node.ID())
}
}
return nodes