Skip to content

Commit e018073

Browse files
apollo_network: added network manager docs (#8952)
* apollo_network: added misconduct score AddAssign docs * apollo_network: added network manager NetworkError docs
1 parent 4b163ce commit e018073

File tree

1 file changed

+18
-0
lines changed
  • crates/apollo_network/src/network_manager

1 file changed

+18
-0
lines changed

crates/apollo_network/src/network_manager/mod.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,28 @@ use crate::sqmr::{self, InboundSessionId, OutboundSessionId, SessionId};
3333
use crate::utils::{is_localhost, make_multiaddr, StreamMap};
3434
use crate::{gossipsub_impl, Bytes, NetworkConfig};
3535

36+
/// Errors that can occur during network operations.
37+
///
38+
/// This enum represents all possible error conditions that may arise
39+
/// during networking operations, from connection failures to protocol-specific
40+
/// errors.
3641
#[derive(thiserror::Error, Debug)]
3742
pub enum NetworkError {
43+
/// Error occurred while attempting to dial a peer.
44+
///
45+
/// This can happen when trying to establish outbound connections to other peers.
46+
/// Common causes include network connectivity issues, invalid addresses,
47+
/// or the target peer being unavailable.
3848
#[error(transparent)]
3949
DialError(#[from] libp2p::swarm::DialError),
50+
51+
/// Broadcast channels for a specific topic were dropped.
52+
///
53+
/// This indicates that the receiving end of broadcast channels has been
54+
/// dropped, which typically happens when the subscriber to a topic
55+
/// stops listening or encounters an error.
56+
///
57+
/// The `topic_hash` identifies which specific topic was affected.
4058
#[error("Channels for broadcast topic with hash {topic_hash:?} were dropped.")]
4159
BroadcastChannelsDropped { topic_hash: TopicHash },
4260
}

0 commit comments

Comments
 (0)