Refactor error tracking to be edge-triggered with node setters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-28 23:06:26 -08:00
parent ed9a0cd60d
commit 99083ecde5
7 changed files with 150 additions and 243 deletions

View File

@@ -226,11 +226,8 @@ func (t *Tendrils) handleAPIStatusStream(w http.ResponseWriter, r *http.Request)
}
func (t *Tendrils) getNodesLocked() []*Node {
unreachableNodes := t.errors.GetUnreachableNodeSet()
nodes := make([]*Node, 0, len(t.nodes.nodes))
for _, node := range t.nodes.nodes {
node.Unreachable = unreachableNodes[node.ID]
nodes = append(nodes, node)
}