Module facade

Module facade 

Source
Expand description

High-level network facade integrating all IPFRS network modules

This module provides a unified interface to all network functionality, making it easy to use advanced features without manual wiring.

§Example

use ipfrs_network::NetworkFacadeBuilder;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut facade = NetworkFacadeBuilder::new()
        .with_preset_mobile()
        .with_semantic_dht()
        .with_gossipsub()
        .with_geo_routing()
        .build()?;

    facade.start().await?;

    // Use integrated features
    let health = facade.get_health();
    println!("Network health: {:?}", health.status);

    Ok(())
}

Structs§

ModuleStatus
Detailed module status
NetworkFacade
High-level network facade integrating all modules
NetworkFacadeBuilder
Builder for NetworkFacade
NetworkStats
Comprehensive network statistics