docs: update architecture docs for DI migration (#656)#673
Merged
Conversation
## Context After completing the DI migration (PRs A-F in #656), the documentation needed updates to reflect the new architecture. ## Changes ### ARCHITECTURE.md - Added new section: **Dependency Injection (AppContext)** - Documents AppContext fields and accessors - Shows construction pattern and testing usage - Updated startup sequence diagram to show AppContext construction - Updated module description to mention `src/app/context.rs` - Changed `run(keys, client, ln)` to `run(ctx, ln)` in diagram ### STARTUP_AND_CONFIG.md - Updated startup steps 8-10: - Step 8: Build AppContext with all dependencies - Step 9: `start_scheduler(ctx)` now receives AppContext - Step 10: `run(ctx, ln_client)` receives AppContext ### DEV_FEE.md - Updated code example to show new scheduler pattern: - `job_process_dev_fee_payment(ctx: AppContext)` - `ctx.pool()` instead of `get_db_pool()` ## Related - Parent cleanup issue: #656 - DI migration PRs: #663, #665, #666, #667, #670, #672
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
After completing the DI migration (PRs A-F in #656), the documentation needed updates to reflect the new architecture.
Changes
ARCHITECTURE.md
AppContextfields and accessorsTestContextBuilderusage for testingAppContextconstructionsrc/app/context.rsrun(keys, client, ln)→run(ctx, ln)in diagramSTARTUP_AND_CONFIG.md
AppContextwith all dependenciesstart_scheduler(ctx)now receivesAppContextrun(ctx, ln_client)receivesAppContextDEV_FEE.md
job_process_dev_fee_payment(ctx: AppContext)ctx.pool()instead ofget_db_pool()Diff Stats
Related
Closes
This PR completes the documentation updates for the DI migration. After this, #656 can be closed as complete.