refactor(peer): extract peer startup task spawning
The peer runtime used to spawn each long-running service inline inside run_peer. That made the startup path harder to scan because service names, clone setup, and task error handling were interleaved with the command loop. Move the task wrappers into a startup module and leave run_peer as the lifecycle overview: create shared context, start services, handle commands, then send shutdown goodbyes. The spawned services and their error handling are unchanged; only the ownership plumbing moved into named helpers. Test Plan: - cargo clippy - cargo clippy --benches - cargo clippy --tests - cargo +nightly fmt Refs: none
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
//! Long-running peer services.
|
||||
//!
|
||||
//! Each submodule owns one runtime concern. The public surface intentionally
|
||||
//! stays small because `lib.rs` only needs to start these four background tasks.
|
||||
//! stays small because peer startup only needs to start these four background
|
||||
//! tasks.
|
||||
|
||||
mod advertise;
|
||||
mod discovery;
|
||||
|
||||
Reference in New Issue
Block a user