fx.go ×3

Frontier kind: Code frontier

unlabeled · c_fb1ce2c476ff

42 tests · 3141 LOC · 164 files · introduces 0 tests · 42 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges42 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
462 ranges3141 lines · 164 files · Browse complete extent
All tests (intent)
42 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: 42 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/fx.go 42 introduced LOC · 3 ranges

Open complete file

531 metricsHandler metrics.Handler,
532 logger log.SnTaggedLogger,
533 > ) interceptor.NamespaceRateLimitInterceptor { fx.go
534 > var globalNamespaceRPS, globalNamespaceVisibilityRPS, globalNamespaceNamespaceReplicationInducingAPIsRPS dynamicconfig.IntPropertyFnWithNamespaceFilter
535 >
536 > switch serviceName {
537 > case primitives.FrontendService:
538 > globalNamespaceRPS = serviceConfig.GlobalNamespaceRPS
539 > globalNamespaceVisibilityRPS = serviceConfig.GlobalNamespaceVisibilityRPS
540 > globalNamespaceNamespaceReplicationInducingAPIsRPS = serviceConfig.GlobalNamespaceNamespaceReplicationInducingAPIsRPS
541 case primitives.InternalFrontendService:
542 globalNamespaceRPS = serviceConfig.InternalFEGlobalNamespaceRPS
548 }
549
550 > namespaceRateFn := calculator.NewLoggedNamespaceCalculator( fx.go
551 > calculator.ClusterAwareNamespaceQuotaCalculator{
552 > MemberCounter: frontendServiceResolver,
553 > PerInstanceQuota: serviceConfig.MaxNamespaceRPSPerInstance,
554 > GlobalQuota: globalNamespaceRPS,
555 > },
556 > log.With(logger, tag.ComponentRPCHandler, tag.ScopeNamespace),
557 > ).GetQuota
558 > visibilityRateFn := calculator.NewLoggedNamespaceCalculator(
559 > calculator.ClusterAwareNamespaceQuotaCalculator{
560 > MemberCounter: frontendServiceResolver,
561 > PerInstanceQuota: serviceConfig.MaxNamespaceVisibilityRPSPerInstance,
562 > GlobalQuota: globalNamespaceVisibilityRPS,
563 > },
564 > log.With(logger, tag.ComponentVisibilityHandler, tag.ScopeNamespace),
565 > ).GetQuota
566 > namespaceReplicationInducingRateFn := calculator.NewLoggedNamespaceCalculator(
567 > calculator.ClusterAwareNamespaceQuotaCalculator{
568 > MemberCounter: frontendServiceResolver,
569 > PerInstanceQuota: serviceConfig.MaxNamespaceNamespaceReplicationInducingAPIsRPSPerInstance,
570 > GlobalQuota: globalNamespaceNamespaceReplicationInducingAPIsRPS,
571 > },
572 > log.With(logger, tag.ComponentNamespaceReplication, tag.ScopeNamespace),
573 > ).GetQuota
574 > namespaceRateLimiter := quotas.NewNamespaceRequestRateLimiter(
575 > func(req quotas.Request) quotas.RequestRateLimiter {
576 return configs.NewRequestToRateLimiter(
577 quotas.NewNamespaceRateBurst(
594 },
595 )
596 > return interceptor.NewNamespaceRateLimitInterceptor( fx.go
597 > namespaceRegistry,
598 > namespaceRateLimiter,
599 > map[string]int{}, // no token overrides
600 > configs.PollTaskAPISet,
601 > serviceConfig.PollWaitForNamespaceRateLimitToken,
602 > metricsHandler,
603 > )
604 }
605