handler.go ×3

Frontier kind: Joint frontier

unlabeled · c_2c0d36b0cde9

1 test · 4231 LOC · 193 files · introduces 1 test · 41 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges41 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
593 ranges4231 lines · 193 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

3 files ranked by introduced lines: 41 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/handler.go 22 introduced LOC · 3 ranges

Open complete file

702
703 // DescribeHistoryHost returns information about the internal states of a history host
704 > func (h *Handler) DescribeHistoryHost(_ context.Context, req *historyservice.DescribeHistoryHostRequest) (*historyservice.DescribeHistoryHostResponse, error) { handler.go
705 > // This API supports describe history host by 1. address 2. shard id 3. namespace id + workflow id
706 > // if option 2/3 is provided, we want to check on the shard ownership to return the correct host address.
707 > shardID := req.GetShardId()
708 > if len(req.GetNamespaceId()) != 0 && req.GetWorkflowExecution() != nil {
709 shardID = common.WorkflowIDToHistoryShard(req.GetNamespaceId(), req.GetWorkflowExecution().GetWorkflowId(), h.config.NumberOfShards)
710 }
711 > if shardID > 0 { handler.go
712 > _, err := h.controller.GetShardByID(shardID)
713 > if err != nil {
714 > return nil, err
715 > }
716 }
717
718 > itemsInRegistryByIDCount, itemsInRegistryByNameCount := h.namespaceRegistry.GetRegistrySize() handler.go
719 > ownedShardIDs := h.controller.ShardIDs()
720 > resp := &historyservice.DescribeHistoryHostResponse{
721 > ShardsNumber: int32(len(ownedShardIDs)),
722 > ShardIds: ownedShardIDs,
723 > NamespaceCache: &namespacespb.NamespaceCacheInfo{
724 > ItemsInCacheByIdCount: itemsInRegistryByIDCount,
725 > ItemsInCacheByNameCount: itemsInRegistryByNameCount,
726 > },
727 > Address: h.hostInfoProvider.HostInfo().GetAddress(),
728 > }
729 > return resp, nil
730 }
731
go.temporal.io/server/common/namespace/registry_mock.go 11 introduced LOC · 2 ranges

Open complete file

175
176 // GetRegistrySize mocks base method.
177 > func (m *MockRegistry) GetRegistrySize() (int64, int64) { registry_mock.go
178 > m.ctrl.T.Helper()
179 > ret := m.ctrl.Call(m, "GetRegistrySize")
180 > ret0, _ := ret[0].(int64)
181 > ret1, _ := ret[1].(int64)
182 > return ret0, ret1
183 > }
184
185 // GetRegistrySize indicates an expected call of GetRegistrySize.
186 > func (mr *MockRegistryMockRecorder) GetRegistrySize() *gomock.Call { registry_mock.go
187 > mr.mock.ctrl.T.Helper()
188 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRegistrySize", reflect.TypeOf((*MockRegistry)(nil).GetRegistrySize))
189 > }
190
191 // RefreshNamespaceById mocks base method.
go.temporal.io/server/api/historyservice/v1/request_response.pb.go 8 introduced LOC · 2 ranges

Open complete file

5316 }
5317
5318 > func (x *DescribeHistoryHostRequest) GetShardId() int32 { request_response.pb.go
5319 > if x != nil {
5320 > return x.ShardId
5321 > }
5322 return 0
5323 }
5324
5325 > func (x *DescribeHistoryHostRequest) GetNamespaceId() string { request_response.pb.go
5326 > if x != nil {
5327 > return x.NamespaceId
5328 > }
5329 return ""
5330 }