-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Create a single composition root that constructs and wires all components with constructor injection.
I think we have some options.
- Manual DI
- Pros: Explicit; No magic
- Cons: Verbose, harder to test
- Google Wire
- Pros: Compile-time checks
- Cons: Codegen step, we'll have to add a build setup and script, using justfile or something, Wire is no longer maintained so we'll have to fork it.
- Uber Fx
- Pros: Lifecycle hooks
- Cons: Reflection/magic, slower
(we're open to any other option)
tasks
- Return cleanup functions from constructors. aggregate and defer
- App starts with explicit wiring. no hidden globals
- Global context manager and graceful startup and shutdown with timeouts for modules.
-
go testcan construct core with fakes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels