mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
docs: inline mermaid diagrams while aquamarine is fixed (#13302)
This commit is contained in:
@ -70,13 +70,37 @@ use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||
use tracing::{debug, error, trace, warn};
|
||||
|
||||
#[cfg_attr(doc, aquamarine::aquamarine)]
|
||||
// TODO: Inlined diagram due to a bug in aquamarine library, should become an include when it's
|
||||
// fixed. See https://github.com/mersinvald/aquamarine/issues/50
|
||||
// include_mmd!("docs/mermaid/network-manager.mmd")
|
||||
/// Manages the _entire_ state of the network.
|
||||
///
|
||||
/// This is an endless [`Future`] that consistently drives the state of the entire network forward.
|
||||
///
|
||||
/// The [`NetworkManager`] is the container type for all parts involved with advancing the network.
|
||||
///
|
||||
/// include_mmd!("docs/mermaid/network-manager.mmd")
|
||||
/// ```mermaid
|
||||
/// graph TB
|
||||
/// handle(NetworkHandle)
|
||||
/// events(NetworkEvents)
|
||||
/// transactions(Transactions Task)
|
||||
/// ethrequest(ETH Request Task)
|
||||
/// discovery(Discovery Task)
|
||||
/// subgraph NetworkManager
|
||||
/// direction LR
|
||||
/// subgraph Swarm
|
||||
/// direction TB
|
||||
/// B1[(Session Manager)]
|
||||
/// B2[(Connection Lister)]
|
||||
/// B3[(Network State)]
|
||||
/// end
|
||||
/// end
|
||||
/// handle <--> |request response channel| NetworkManager
|
||||
/// NetworkManager --> |Network events| events
|
||||
/// transactions <--> |transactions| NetworkManager
|
||||
/// ethrequest <--> |ETH request handing| NetworkManager
|
||||
/// discovery --> |Discovered peers| NetworkManager
|
||||
/// ```
|
||||
#[derive(Debug)]
|
||||
#[must_use = "The NetworkManager does nothing unless polled"]
|
||||
pub struct NetworkManager<N: NetworkPrimitives = EthNetworkPrimitives> {
|
||||
|
||||
Reference in New Issue
Block a user