pub struct NodeConfig {Show 17 fields
pub peer_id: Option<PeerId>,
pub listen_addrs: Vec<Multiaddr>,
pub listen_addr: SocketAddr,
pub bootstrap_peers: Vec<Multiaddr>,
pub bootstrap_peers_str: Vec<String>,
pub enable_ipv6: bool,
pub enable_mcp_server: bool,
pub mcp_server_config: Option<MCPServerConfig>,
pub connection_timeout: Duration,
pub keep_alive_interval: Duration,
pub max_connections: usize,
pub max_incoming_connections: usize,
pub dht_config: DHTConfig,
pub security_config: SecurityConfig,
pub production_config: Option<ProductionConfig>,
pub bootstrap_cache_config: Option<CacheConfig>,
pub identity_config: Option<IdentityManagerConfig>,
}Expand description
Configuration for a P2P node
Fields§
§peer_id: Option<PeerId>Local peer ID for this node
listen_addrs: Vec<Multiaddr>Addresses to listen on for incoming connections
listen_addr: SocketAddrPrimary listen address (for compatibility)
bootstrap_peers: Vec<Multiaddr>Bootstrap peers to connect to on startup (legacy)
bootstrap_peers_str: Vec<String>Bootstrap peers as strings (for integration tests)
enable_ipv6: boolEnable IPv6 support
enable_mcp_server: boolEnable MCP server
mcp_server_config: Option<MCPServerConfig>MCP server configuration
connection_timeout: DurationConnection timeout duration
keep_alive_interval: DurationKeep-alive interval for connections
max_connections: usizeMaximum number of concurrent connections
max_incoming_connections: usizeMaximum number of incoming connections
dht_config: DHTConfigDHT configuration
security_config: SecurityConfigSecurity configuration
production_config: Option<ProductionConfig>Production hardening configuration
bootstrap_cache_config: Option<CacheConfig>Bootstrap cache configuration
identity_config: Option<IdentityManagerConfig>Identity manager configuration
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NodeConfig
impl Debug for NodeConfig
Source§impl Default for NodeConfig
impl Default for NodeConfig
Source§impl<'de> Deserialize<'de> for NodeConfig
impl<'de> Deserialize<'de> for NodeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin for NodeConfig
impl UnwindSafe for NodeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more