registry_impl.go ×4

Frontier kind: Code frontier

unlabeled · c_0008822fd5fb

58 tests · 2229 LOC · 108 files · introduces 0 tests · 19 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges19 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
333 ranges2229 lines · 108 files · Browse complete extent
All tests (intent)
58 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 19 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/workers/registry_impl.go 19 introduced LOC · 4 ranges

Open complete file

116 }
117
118 > isSystemWorker := isSystemWorker(principal, hb.GetTaskQueue()) registry_impl.go
119 >
120 > // Normal upsert
121 > if e, exists := ns.workers[key]; exists {
122 e.hb = hb
123 e.lastSeen = now
124 e.isSystemWorker = isSystemWorker
125 b.order.MoveToBack(e.elem)
126 > } else { registry_impl.go
127 > e = &entry{
128 > nsID: nsID,
129 > hb: hb,
130 > lastSeen: now,
131 > isSystemWorker: isSystemWorker,
132 > }
133 > e.elem = b.order.PushBack(e)
134 > ns.workers[key] = e
135 > added++
136 > }
137 }
138
275 m.total.Add(added - removed)
276 if added > 0 {
277 > metrics.WorkerRegistryWorkersAdded.With(m.metricsHandler).Record(added) registry_impl.go
278 > }
279 if removed > 0 {
280 metrics.WorkerRegistryWorkersRemoved.With(m.metricsHandler).Record(removed)
525 // the Temporal server itself (type="temporal"). Otherwise, it falls back to
526 // checking the task queue name prefix.
527 > func isSystemWorker(principal *commonpb.Principal, taskQueue string) bool { registry_impl.go
528 > if principal != nil {
529 return principal.GetType() == authorization.InternalPrincipalType
530 }