fx.go ×2

Frontier kind: Code frontier

unlabeled · c_5a84f91b5abe

24 tests · 3229 LOC · 160 files · introduces 0 tests · 60 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges60 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
503 ranges3229 lines · 160 files · Browse complete extent
All tests (intent)
24 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: 60 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/fx.go 60 introduced LOC · 2 ranges

Open complete file

143 }
144
145 > func HandlerProvider(args NewHandlerArgs, lc fx.Lifecycle) (*Handler, error) { fx.go
146 > handler := &Handler{
147 > status: common.DaemonStatusInitialized,
148 > config: args.Config,
149 > nexusCompletionHandler: args.NexusCompletionHandler,
150 > tokenSerializer: tasktoken.NewSerializer(),
151 > deepHealthCheckHandler: deepHealthCheckHandler{
152 > healthServer: args.HealthServer,
153 > metricsHandler: args.MetricsHandler,
154 > config: args.Config,
155 > historyHealthSignal: args.HistoryHealthSignal,
156 > persistenceHealthSignal: args.PersistenceHealthSignal,
157 > startupTime: time.Now(),
158 > },
159 > logger: args.Logger,
160 > throttledLogger: args.ThrottledLogger,
161 > persistenceExecutionManager: args.PersistenceExecutionManager,
162 > persistenceShardManager: args.PersistenceShardManager,
163 > persistenceVisibilityManager: args.PersistenceVisibilityManager,
164 > historyServiceResolver: args.HistoryServiceResolver,
165 > metricsHandler: args.MetricsHandler,
166 > payloadSerializer: args.PayloadSerializer,
167 > timeSource: args.TimeSource,
168 > namespaceRegistry: args.NamespaceRegistry,
169 > saProvider: args.SaProvider,
170 > clusterMetadata: args.ClusterMetadata,
171 > archivalMetadata: args.ArchivalMetadata,
172 > hostInfoProvider: args.HostInfoProvider,
173 > controller: args.ShardController,
174 > eventNotifier: args.EventNotifier,
175 > tracer: args.TracerProvider.Tracer(consts.LibraryName),
176 > taskQueueManager: args.TaskQueueManager,
177 > taskCategoryRegistry: args.TaskCategoryRegistry,
178 > dlqMetricsEmitter: args.DLQMetricsEmitter,
179 > chasmEngine: args.ChasmEngine,
180 > chasmRegistry: args.ChasmRegistry,
181 > testHooks: args.TestHooks,
182 >
183 > replicationTaskFetcherFactory: args.ReplicationTaskFetcherFactory,
184 > replicationTaskConverterProvider: args.ReplicationTaskConverterFactory,
185 > streamReceiverMonitor: args.StreamReceiverMonitor,
186 > replicationServerRateLimiter: args.ReplicationServerRateLimiter,
187 > }
188 >
189 > // Build the Nexus handler in OnStart rather than here so that it runs after all
190 > // fx.Invoke functions have completed. If we built it eagerly, the dependency chain
191 > //
192 > // activity.HistoryModule (fx.Invoke)
193 > // → *library → *handler → historyservice.HistoryServiceServer
194 > // → HistoryServiceServerProvider → HandlerProvider (this function)
195 > //
196 > // would force HandlerProvider to run before modules like chasmtests.Module have had
197 > // a chance to register their nexus services via their own fx.Invoke calls. As a
198 > // result, buildNexusHandler would snapshot an empty registry and h.nexusHandler
199 > // would remain nil, causing all StartNexusOperation calls to the system endpoint to
200 > // return "no nexus services registered". OnStart hooks run after ALL invokes are
201 > // done, so the registry is fully populated by the time we call buildNexusHandler.
202 > lc.Append(fx.Hook{
203 > OnStart: func(_ context.Context) error {
204 h, err := buildNexusHandler(args.ChasmRegistry)
205 if err != nil {
211 })
212
213 > return handler, nil fx.go
214 }
215