Commit efccfa3
feat(orchestrator): rewrite main.go to use pipeline.Construct (#440)
Replace ~500 lines of manual wiring with a single pipeline.Construct
call. The orchestrator's run() now:
1. Builds per-queue profiles (Profile/Profiles in profiles.go)
2. Populates orchestrator.Deps with profile-derived Factory adapters
3. Calls pipeline.Construct(deps, orchestrator.Stages, ...) to get a
single lifecycle.Component
4. Drives Start/Stop on that component
Removed:
- newTopicRegistry (topology now declared in orchestrator.Stages)
- queueExtensions/queueRegistry (replaced by Profile/Profiles)
- Three *Factory adapter structs (replaced by func-type adapters)
- registerPrimaryControllers (stages declare their own New funcs)
- registerDLQControllers (stages declare their own DLQ funcs)
The host retains: infrastructure bootstrap, per-queue profile
construction, change provider wiring, gRPC server lifecycle, and signal
handling — all host-specific concerns per the RFC.
## Test Plan
Boot service with main.go and test against simulator
## Issue
https://linear.app/uber/issue/CODEM-209/example-figure-out-a-better-structure-for-wiring-up
## Stack
- #402
- #403
- #404
- @#440
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 772b4f8 commit efccfa3
3 files changed
Lines changed: 245 additions & 616 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
14 | | - | |
15 | 17 | | |
16 | | - | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
| 26 | + | |
28 | 27 | | |
29 | | - | |
30 | | - | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
40 | 37 | | |
41 | 38 | | |
42 | 39 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 40 | | |
49 | 41 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 42 | + | |
63 | 43 | | |
64 | 44 | | |
65 | 45 | | |
| |||
0 commit comments