dlq_metrics_emitter.go ×9

Frontier kind: Joint frontier

unlabeled · c_e2b69a42e79d

1 test · 2109 LOC · 96 files · introduces 1 test · 55 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
15 ranges55 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
326 ranges2109 lines · 96 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.

Introduced files, introduced tests, and structurally relevant concept specializationdlq_metrics_emitter.go ×4 · 13 introduced LOCdlq_metrics_emitter.go ×…dlq_metrics_emitter.go ×3 · 6 introduced LOCdlq_metrics_emitter.go ×…dlq_metrics_emitter.go ×4 · 19 introduced LOCdlq_metrics_emitter.go ×…interfaces_mock.go ×1 · 6 introduced LOCinterfaces_mock.go ×1interfaces_mock.go ×2 · 7 introduced LOCinterfaces_mock.go ×2history_task_queue_manager.go ×2 · 11 introduced LOChistory_task_queue_manag…tags.go ×2 · 3 introduced LOCtags.go ×2task_category_registry.go ×1 · 3 introduced LOCtask_category_registry.g…interfaces_mock.go ×1 · 5 introduced LOCinterfaces_mock.go ×1task_category_registry.go ×1 · 12 introduced LOCtask_category_registry.g…fx.go ×1 · 12 introduced LOCfx.go ×1visibility.go ×2 · 10 introduced LOCvisibility.go ×2capture_handler.go ×1 · 2 introduced LOCcapture_handler.go ×1util.go ×1 · 7 introduced LOCutil.go ×1constants.go ×2 · 6 introduced LOCconstants.go ×2data_interfaces.go ×3 · 6 introduced LOCdata_interfaces.go ×3fixed_address_translator.go ×2 · 9 introduced LOCfixed_address_translator…hostinfo.go ×1 · 3 introduced LOChostinfo.go ×1noop_moving_window_average.go ×1 · 2 introduced LOCnoop_moving_window_avera…search_attribute.go ×12 · 121 introduced LOCsearch_attribute.go ×12category.go ×1 · 3 introduced LOCcategory.go ×1key.go ×1 · 6 introduced LOCkey.go ×1interfaces_mock.go ×1 · 7 introduced LOCinterfaces_mock.go ×1interfaces_mock.go ×1 · 4 introduced LOCinterfaces_mock.go ×1priority.go ×1 · 3 introduced LOCpriority.go ×1setting_gen.go ×51 · 335 introduced LOCsetting_gen.go ×51interfaces_mock.go ×1 · 3 introduced LOCinterfaces_mock.go ×1hostinfo.go ×1 · 3 introduced LOChostinfo.go ×1interfaces_mock.go ×1 · 5 introduced LOCinterfaces_mock.go ×1grpc_resolver.go ×2 · 7 introduced LOCgrpc_resolver.go ×2predicates.pb.go ×21 · 54 introduced LOCpredicates.pb.go ×21service.pb.go ×2 · 342 introduced LOCservice.pb.go ×2message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2capture_handler.go ×1 · 2 introduced LOCcapture_handler.go ×1constants.go ×3 · 11 introduced LOCconstants.go ×3constants.go ×1 · 3 introduced LOCconstants.go ×1capture_handler.go ×4 · 13 introduced LOCcapture_handler.go ×4constants.go ×1 · 6 introduced LOCconstants.go ×1task.pb.go ×1 · 3 introduced LOCtask.pb.go ×1message.pb.go ×2 · 442 introduced LOCmessage.pb.go ×2capture_handler.go ×1 · 2 introduced LOCcapture_handler.go ×1capture_handler.go ×2 · 6 introduced LOCcapture_handler.go ×2interface_mock.go ×1 · 5 introduced LOCinterface_mock.go ×1capture_handler.go ×1 · 9 introduced LOCcapture_handler.go ×1capture_handler.go ×1 · 3 introduced LOCcapture_handler.go ×1capture_handler.go ×1 · 7 introduced LOCcapture_handler.go ×1defs.go ×1 · 3 introduced LOCdefs.go ×1defs_base.go ×1 · 3 introduced LOCdefs_base.go ×1metrics.go ×1 · 1 introduced LOCmetrics.go ×1defs.go ×5 · 91 introduced LOCdefs.go ×5interface_mock.go ×1 · 5 introduced LOCinterface_mock.go ×1interface_mock.go ×1 · 3 introduced LOCinterface_mock.go ×1interface_mock.go ×1 · 5 introduced LOCinterface_mock.go ×1tags.go ×9 · 37 introduced LOCtags.go ×9message.pb.go ×2 · 49 introduced LOCmessage.pb.go ×2cluster.pb.go ×2 · 200 introduced LOCcluster.pb.go ×2TestSetCallerInfo_NoExistingCallerInfo · 0 introduced LOCTestSetCallerInfo_NoExis…retrypolicy.go ×2 · 11 introduced LOCretrypolicy.go ×2wildcard.go ×1 · 2 introduced LOCwildcard.go ×1caller_info.go ×1 · 7 introduced LOCcaller_info.go ×1headers.go ×1 · 2 introduced LOCheaders.go ×1retrypolicy.go ×1 · 4 introduced LOCretrypolicy.go ×1wildcard.go ×4 · 14 introduced LOCwildcard.go ×4headers.go ×3 · 8 introduced LOCheaders.go ×3retrypolicy.go ×3 · 19 introduced LOCretrypolicy.go ×3message.pb.go ×2 · 20 introduced LOCmessage.pb.go ×2payload.go ×1 · 3 introduced LOCpayload.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/api/adminservice/v1/request_response.pb.go · 6661 LOCv1/request_response.pb.g…go.temporal.io/server/api/adminservice/v1/service.pb.go · 297 LOCv1/service.pb.gogo.temporal.io/server/api/chasm/v1/message.pb.go · 230 LOCv1/message.pb.gogo.temporal.io/server/api/clock/v1/message.pb.go · 217 LOCv1/message.pb.gogo.temporal.io/server/api/cluster/v1/message.pb.go · 366 LOCv1/message.pb.gogo.temporal.io/server/api/common/v1/api_category.pb.go · 230 LOCv1/api_category.pb.gogo.temporal.io/server/api/common/v1/dlq.pb.go · 319 LOCv1/dlq.pb.gogo.temporal.io/server/api/deployment/v1/message.pb.go · 4650 LOCv1/message.pb.gogo.temporal.io/server/api/enums/v1/cluster.pb.go · 233 LOCv1/cluster.pb.gogo.temporal.io/server/api/enums/v1/common.pb.go · 288 LOCv1/common.pb.gogo.temporal.io/server/api/enums/v1/dlq.pb.go · 211 LOCv1/dlq.pb.gogo.temporal.io/server/api/enums/v1/fairness_state.pb.go · 147 LOCv1/fairness_state.pb.gogo.temporal.io/server/api/enums/v1/nexus.pb.go · 182 LOCv1/nexus.pb.gogo.temporal.io/server/api/enums/v1/predicate.pb.go · 194 LOCv1/predicate.pb.gogo.temporal.io/server/api/enums/v1/replication.pb.go · 338 LOCv1/replication.pb.gogo.temporal.io/server/api/enums/v1/task.pb.go · 480 LOCv1/task.pb.gogo.temporal.io/server/api/enums/v1/workflow.pb.go · 299 LOCv1/workflow.pb.gogo.temporal.io/server/api/enums/v1/workflow_task_type.pb.go · 148 LOCv1/workflow_task_type.pb…go.temporal.io/server/api/errordetails/v1/message.pb.go · 649 LOCv1/message.pb.gogo.temporal.io/server/api/health/v1/message.pb.go · 324 LOCv1/message.pb.gogo.temporal.io/server/api/history/v1/message.pb.go · 522 LOCv1/message.pb.gogo.temporal.io/server/api/historyservice/v1/request_response.pb.go · 12003 LOCv1/request_response.pb.g…go.temporal.io/server/api/historyservice/v1/service.pb.go · 452 LOCv1/service.pb.gogo.temporal.io/server/api/matchingservice/v1/request_response.pb.go · 6878 LOCv1/request_response.pb.g…go.temporal.io/server/api/matchingservice/v1/service.pb.go · 274 LOCv1/service.pb.gogo.temporal.io/server/api/metrics/v1/message.pb.go · 128 LOCv1/message.pb.gogo.temporal.io/server/api/namespace/v1/message.pb.go · 138 LOCv1/message.pb.gogo.temporal.io/server/api/persistence/v1/chasm.pb.go · 1215 LOCv1/chasm.pb.gogo.temporal.io/server/api/persistence/v1/chasm_visibility.pb.go · 170 LOCv1/chasm_visibility.pb.g…go.temporal.io/server/api/persistence/v1/cluster_metadata.pb.go · 313 LOCv1/cluster_metadata.pb.g…go.temporal.io/server/api/persistence/v1/executions.pb.go · 5768 LOCv1/executions.pb.gogo.temporal.io/server/api/persistence/v1/history_tree.pb.go · 298 LOCv1/history_tree.pb.gogo.temporal.io/server/api/persistence/v1/hsm.pb.go · 929 LOCv1/hsm.pb.gogo.temporal.io/server/api/persistence/v1/namespaces.pb.go · 560 LOCv1/namespaces.pb.gogo.temporal.io/server/api/persistence/v1/nexus.pb.go · 509 LOCv1/nexus.pb.gogo.temporal.io/server/api/persistence/v1/predicates.go-helpers.pb.go · 413 LOCv1/predicates.go-helpers…go.temporal.io/server/api/persistence/v1/predicates.pb.go · 864 LOCv1/predicates.pb.gogo.temporal.io/server/api/persistence/v1/queue_metadata.pb.go · 129 LOCv1/queue_metadata.pb.gogo.temporal.io/server/api/persistence/v1/queues.pb.go · 641 LOCv1/queues.pb.gogo.temporal.io/server/api/persistence/v1/task_queues.pb.go · 924 LOCv1/task_queues.pb.gogo.temporal.io/server/api/persistence/v1/tasks.pb.go · 870 LOCv1/tasks.pb.gogo.temporal.io/server/api/persistence/v1/update.pb.go · 455 LOCv1/update.pb.gogo.temporal.io/server/api/persistence/v1/workflow_mutable_state.pb.go · 560 LOCv1/workflow_mutable_stat…go.temporal.io/server/api/replication/v1/message.pb.go · 2481 LOCv1/message.pb.gogo.temporal.io/server/api/taskqueue/v1/message.pb.go · 1363 LOCv1/message.pb.gogo.temporal.io/server/api/token/v1/message.pb.go · 809 LOCv1/message.pb.gogo.temporal.io/server/api/visibilityservice/v1/request_response.pb.go · 426 LOCv1/request_response.pb.g…go.temporal.io/server/api/workflow/v1/message.pb.go · 302 LOCv1/message.pb.gogo.temporal.io/server/chasm/library.go · 60 LOCchasm/library.gogo.temporal.io/server/chasm/registrable_component.go · 233 LOCchasm/registrable_compon…go.temporal.io/server/chasm/search_attribute.go · 525 LOCchasm/search_attribute.g…go.temporal.io/server/common/aggregate/noop_moving_window_average.go · 13 LOCaggregate/noop_moving_wi…go.temporal.io/server/common/backoff/retrypolicy.go · 347 LOCbackoff/retrypolicy.gogo.temporal.io/server/common/build/build.go · 56 LOCbuild/build.gogo.temporal.io/server/common/dynamicconfig/collection.go · 779 LOCdynamicconfig/collection…go.temporal.io/server/common/dynamicconfig/deepcopy.go · 78 LOCdynamicconfig/deepcopy.g…go.temporal.io/server/common/dynamicconfig/gradual_change.go · 196 LOCdynamicconfig/gradual_ch…go.temporal.io/server/common/dynamicconfig/key.go · 21 LOCdynamicconfig/key.gogo.temporal.io/server/common/dynamicconfig/registry.go · 44 LOCdynamicconfig/registry.g…go.temporal.io/server/common/dynamicconfig/setting_gen.go · 1972 LOCdynamicconfig/setting_ge…go.temporal.io/server/common/dynamicconfig/shared_structure.go · 69 LOCdynamicconfig/shared_str…go.temporal.io/server/common/headers/caller_info.go · 165 LOCheaders/caller_info.gogo.temporal.io/server/common/headers/headers.go · 167 LOCheaders/headers.gogo.temporal.io/server/common/log/interface_mock.go · 240 LOClog/interface_mock.gogo.temporal.io/server/common/log/tag/tags.go · 1039 LOCtag/tags.gogo.temporal.io/server/common/log/tag/zap_tag.go · 242 LOCtag/zap_tag.gogo.temporal.io/server/common/membership/grpc_resolver.go · 169 LOCmembership/grpc_resolver…go.temporal.io/server/common/membership/hostinfo.go · 29 LOCmembership/hostinfo.gogo.temporal.io/server/common/membership/interfaces_mock.go · 343 LOCmembership/interfaces_mo…go.temporal.io/server/common/metrics/defs.go · 76 LOCmetrics/defs.gogo.temporal.io/server/common/metrics/defs_base.go · 30 LOCmetrics/defs_base.gogo.temporal.io/server/common/metrics/metrics.go · 85 LOCmetrics/metrics.gogo.temporal.io/server/common/metrics/metricstest/capture_handler.go · 145 LOCmetricstest/capture_hand…go.temporal.io/server/common/metrics/noop_impl.go · 58 LOCmetrics/noop_impl.gogo.temporal.io/server/common/metrics/option.go · 21 LOCmetrics/option.gogo.temporal.io/server/common/metrics/registry.go · 75 LOCmetrics/registry.gogo.temporal.io/server/common/metrics/tags.go · 619 LOCmetrics/tags.gogo.temporal.io/server/common/payload/payload.go · 127 LOCpayload/payload.gogo.temporal.io/server/common/persistence/client/fx.go · 241 LOCclient/fx.gogo.temporal.io/server/common/persistence/data_interfaces.go · 1453 LOCpersistence/data_interfa…go.temporal.io/server/common/persistence/data_interfaces_mock.go · 1462 LOCpersistence/data_interfa…go.temporal.io/server/common/persistence/dlq_metrics_emitter.go · 160 LOCpersistence/dlq_metrics_…go.temporal.io/server/common/persistence/history_task_queue_manager.go · 263 LOCpersistence/history_task…go.temporal.io/server/common/persistence/noop_health_signal_aggregator.go · 31 LOCpersistence/noop_health_…go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/translator/fixed_address_translator.go · 84 LOCtranslator/fixed_address…go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/translator/translator_plugin.go · 35 LOCtranslator/translator_pl…go.temporal.io/server/common/persistence/persistence_rate_limited_clients.go · 1186 LOCpersistence/persistence_…go.temporal.io/server/common/persistence/sql/sqlplugin/visibility.go · 336 LOCsqlplugin/visibility.gogo.temporal.io/server/common/persistence/visibility/store/query/util.go · 165 LOCquery/util.gogo.temporal.io/server/common/searchattribute/sadefs/constants.go · 396 LOCsadefs/constants.gogo.temporal.io/server/common/tasks/priority.go · 81 LOCtasks/priority.gogo.temporal.io/server/common/util.go · 791 LOCcommon/util.gogo.temporal.io/server/common/util/wildcard.go · 50 LOCutil/wildcard.gogo.temporal.io/server/service/history/tasks/category.go · 123 LOCtasks/category.gogo.temporal.io/server/service/history/tasks/key.go · 144 LOCtasks/key.gogo.temporal.io/server/service/history/tasks/task_category_registry.go · 65 LOCtasks/task_category_regi…TestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestTSCBWithDynamicSettings · introduced test · go.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsTestTSCBWithDynamicSetti…TestDeepCopy_OtherReferenceTypes_Nil · introduced test · go.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_NilTestDeepCopy_OtherRefere…TestSetCallerInfo_NoExistingCallerInfo · introduced test · go.temporal.io/server/common/headers/TestCallerInfoSuite/TestSetCallerInfo_NoExistingCallerInfoTestSetCallerInfo_NoExis…TestMutexMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestMutexMapBaggageTestMutexMapBaggageTestSyncMapBaggage · introduced test · go.temporal.io/server/common/metrics/TestBaggageBenchSuite/TestSyncMapBaggageTestSyncMapBaggageTestDLQMetricsEmitter_EmitMetrics_WhenInstanceHostsShardOne · introduced test · go.temporal.io/server/common/persistence/TestDLQMetricsEmitter_EmitMetrics_WhenInstanceHostsShardOneTestDLQMetricsEmitter_Em…TestAPITypeCallOriginPriorityOverrideMapping · introduced test · go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappingTestAPITypeCallOriginPri…TestBackgroundTypeAPIPriorityOverrideMapping · introduced test · go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappingTestBackgroundTypeAPIPri…TestCallerTypeDefaultPriorityMapping · introduced test · go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappingTestCallerTypeDefaultPri…TestRequestPrioritiesOrdered · introduced test · go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedTestRequestPrioritiesOrd…TestDbFields_LastField_Version · introduced test · go.temporal.io/server/common/persistence/sql/sqlplugin/TestDbFields_LastField_VersionTestDbFields_LastField_V…TestGetDbIndexSearchAttributesDefault · introduced test · go.temporal.io/server/common/searchattribute/sadefs/TestGetDbIndexSearchAttributesDefaultTestGetDbIndexSearchAttr…TestValidateSqlDbSystemNameToColNameMap · introduced test · go.temporal.io/server/common/searchattribute/sadefs/TestValidateSqlDbSystemNameToColNameMapTestValidateSqlDbSystemN…TestAPIPrioritiesOrdered · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedTestAPIPrioritiesOrderedTestAPIToPriorityMapping · introduced test · go.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingTestAPIToPriorityMappingFocused concept · dlq_metrics_emitter.go ×9 · 55 introduced LOCdlq_metrics_emitter.go ×…

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: 55 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/dlq_metrics_emitter.go 35 introduced LOC · 9 ranges

Open complete file

79 case <-s.emitMetricsTimer.C:
80 if s.shouldEmitMetrics() {
81 > s.emitMetrics() dlq_metrics_emitter.go
82 } else {
83 // We have to clear the gauge dlq_message_count for this host when another host starts
89 }
90
91 > func (s *DLQMetricsEmitter) emitMetrics() { dlq_metrics_emitter.go
92 > categories := s.taskCategoryRegistry.GetCategories()
93 > messageCounts := make(map[int]int64)
94 > for category := range categories {
95 > messageCounts[category] = 0
96 > }
97 > queues, err := s.getDLQList()
98 > if err != nil {
99 s.logger.Error("Failed to list DLQs to emit metrics", tag.Error(err))
100 return
101 }
102 > for _, q := range queues { dlq_metrics_emitter.go
103 > category, err := GetHistoryTaskQueueCategoryID(q.QueueName)
104 > if err != nil {
105 s.logger.Error("Failed to process DLQ queue name", tag.Error(err))
106 }
107 > messageCounts[category] += q.MessageCount dlq_metrics_emitter.go
108 }
109 > for id, count := range messageCounts { dlq_metrics_emitter.go
110 > category, ok := categories[id]
111 > if !ok {
112 s.logger.Error("Failed to find category from ID", tag.TaskCategoryID(id))
113 }
114 > metrics.DLQMessageCount.With(s.metricsHandler).Record(float64(count), metrics.TaskCategoryTag(category.Name())) dlq_metrics_emitter.go
115 }
116 }
122 }
123
124 > func (s *DLQMetricsEmitter) getDLQList() ([]QueueInfo, error) { dlq_metrics_emitter.go
125 > var queues []QueueInfo
126 > var nextPageToken []byte
127 > for {
128 > ctx := headers.SetCallerInfo(context.Background(), headers.SystemPreemptableCallerInfo)
129 > resp, err := s.historyTaskQueueManager.ListQueues(ctx, &ListQueuesRequest{
130 > QueueType: QueueTypeHistoryDLQ,
131 > PageSize: 100,
132 > NextPageToken: nextPageToken,
133 > })
134 > if err != nil {
135 return nil, err
136 }
137 > queues = append(queues, resp.Queues...) dlq_metrics_emitter.go
138 > nextPageToken = resp.NextPageToken
139 > if len(nextPageToken) == 0 {
140 > return queues, nil
141 > }
142 }
143 }
154 hostInfo := s.hostInfoProvider.HostInfo()
155 if ownerInfo.Identity() == hostInfo.Identity() {
156 > return true dlq_metrics_emitter.go
157 > }
158
159 return false
go.temporal.io/server/common/persistence/data_interfaces_mock.go 14 introduced LOC · 3 ranges

Open complete file

1356
1357 // EXPECT returns an object that allows the caller to indicate expected use.
1358 > func (m *MockHistoryTaskQueueManager) EXPECT() *MockHistoryTaskQueueManagerMockRecorder { data_interfaces_mock.go
1359 > return m.recorder
1360 > }
1361
1362 // Close mocks base method.
1418
1419 // ListQueues mocks base method.
1420 > func (m *MockHistoryTaskQueueManager) ListQueues(ctx context.Context, request *ListQueuesRequest) (*ListQueuesResponse, error) { data_interfaces_mock.go
1421 > m.ctrl.T.Helper()
1422 > ret := m.ctrl.Call(m, "ListQueues", ctx, request)
1423 > ret0, _ := ret[0].(*ListQueuesResponse)
1424 > ret1, _ := ret[1].(error)
1425 > return ret0, ret1
1426 > }
1427
1428 // ListQueues indicates an expected call of ListQueues.
1429 > func (mr *MockHistoryTaskQueueManagerMockRecorder) ListQueues(ctx, request any) *gomock.Call { data_interfaces_mock.go
1430 > mr.mock.ctrl.T.Helper()
1431 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListQueues", reflect.TypeOf((*MockHistoryTaskQueueManager)(nil).ListQueues), ctx, request)
1432 > }
1433
1434 // ReadRawTasks mocks base method.
go.temporal.io/server/common/persistence/history_task_queue_manager.go 6 introduced LOC · 3 ranges

Open complete file

251 }
252
253 > func GetHistoryTaskQueueCategoryID(queueName string) (int, error) { history_task_queue_manager.go
254 > fields := strings.SplitN(queueName, "_", 4)
255 > if len(fields) != 4 {
256 return 0, fmt.Errorf("%w: %s", ErrInvalidQueueName, queueName)
257 }
258 > category, err := strconv.Atoi(fields[0]) history_task_queue_manager.go
259 > if err != nil {
260 return 0, fmt.Errorf("%v: %w", ErrMsgFailedToParseCategoryID, err)
261 }
262 > return category, nil history_task_queue_manager.go
263 }