feat(p2p): add production infrastructure modules

- error.rs: Structured error types with context for all subsystems
  (transport, routing, crypto, protocol, store, config)
- config.rs: Runtime configuration with TOML parsing and validation
- metrics.rs: Counter/gauge/histogram metrics with transport-specific
  tracking and JSON-serializable snapshots
- rate_limit.rs: Token bucket rate limiting with per-peer tracking,
  duty cycle enforcement for LoRa, and backpressure control

These modules provide the foundation for production deployment.
This commit is contained in:
2026-04-01 09:16:44 +02:00
parent ac36534063
commit 024b6c91d1
7 changed files with 1824 additions and 0 deletions

View File

@@ -15,7 +15,9 @@
pub mod address;
pub mod announce;
pub mod announce_protocol;
pub mod config;
pub mod crypto_negotiation;
pub mod error;
pub mod fapp;
pub mod fapp_router;
pub mod broadcast;
@@ -23,7 +25,9 @@ pub mod envelope;
pub mod envelope_v2;
pub mod keypackage_cache;
pub mod mesh_protocol;
pub mod metrics;
pub mod mls_lite;
pub mod rate_limit;
pub mod identity;
pub mod link;
pub mod mesh_router;