CLAUDE.md: update UNDF count to 749
This commit is contained in:
parent
7ab4695e82
commit
750b27a453
4 changed files with 116 additions and 2 deletions
|
|
@ -0,0 +1,59 @@
|
|||
# UNDF: (leave blank)
|
||||
--- a/agent/ui_endpoint.go
|
||||
+++ b/agent/ui_endpoint.go
|
||||
@@ -516,6 +516,8 @@ func summarizeServices(dump structs.ServiceDump, cfg *config.RuntimeConfig, dc s
|
||||
sum := getService(psn)
|
||||
|
||||
svc := csn.Service
|
||||
+ // nodesSet and tagsSet are transient per-summary dedup helpers; they are
|
||||
+ // stored on ServiceSummary during the loop and cleared before return.
|
||||
|
||||
- found := false
|
||||
- for _, existing := range sum.Nodes {
|
||||
- if existing == csn.Node.Node {
|
||||
- found = true
|
||||
- break
|
||||
- }
|
||||
- }
|
||||
- if !found {
|
||||
+ if sum.nodesSet == nil {
|
||||
+ sum.nodesSet = make(map[string]struct{})
|
||||
+ }
|
||||
+ if _, seen := sum.nodesSet[csn.Node.Node]; !seen {
|
||||
+ sum.nodesSet[csn.Node.Node] = struct{}{}
|
||||
sum.Nodes = append(sum.Nodes, csn.Node.Node)
|
||||
}
|
||||
|
||||
@@ -611,15 +613,13 @@ func summarizeServices(dump structs.ServiceDump, cfg *config.RuntimeConfig, dc s
|
||||
- for _, tag := range svc.Tags {
|
||||
- found := false
|
||||
- for _, existing := range sum.Tags {
|
||||
- if existing == tag {
|
||||
- found = true
|
||||
- break
|
||||
- }
|
||||
- }
|
||||
- if !found {
|
||||
- sum.Tags = append(sum.Tags, tag)
|
||||
- }
|
||||
+ if sum.tagsSet == nil {
|
||||
+ sum.tagsSet = make(map[string]struct{})
|
||||
+ }
|
||||
+ for _, tag := range svc.Tags {
|
||||
+ if _, seen := sum.tagsSet[tag]; !seen {
|
||||
+ sum.tagsSet[tag] = struct{}{}
|
||||
+ sum.Tags = append(sum.Tags, tag)
|
||||
+ }
|
||||
}
|
||||
|
||||
--- a/agent/ui_endpoint.go (ServiceSummary struct)
|
||||
+++ b/agent/ui_endpoint.go (ServiceSummary struct)
|
||||
@@ -460,6 +460,10 @@ type ServiceSummary struct {
|
||||
// internal fields to track uniqueness
|
||||
externalSourceSet map[string]struct{}
|
||||
checks map[string]*structs.HealthCheck
|
||||
+
|
||||
+ // Transient dedup sets used during summarizeServices; nil after construction.
|
||||
+ nodesSet map[string]struct{}
|
||||
+ tagsSet map[string]struct{}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue