Struct ipfs_embed::NetworkConfig
source · [−]pub struct NetworkConfig {Show 13 fields
pub enable_loopback: bool,
pub port_reuse: bool,
pub node_name: String,
pub node_key: Keypair,
pub psk: Option<[u8; 32]>,
pub dns: Option<DnsConfig>,
pub mdns: Option<MdnsConfig>,
pub kad: Option<KadConfig>,
pub ping: Option<PingConfig>,
pub identify: Option<IdentifyConfig>,
pub gossipsub: Option<GossipsubConfig>,
pub broadcast: Option<BroadcastConfig>,
pub bitswap: Option<BitswapConfig>,
}
Expand description
Network configuration.
Fields
enable_loopback: bool
Enable adding loopback addresses to the address book. Should be enabled during testing and disabled in production.
port_reuse: bool
Enable binding to the listen port number when dialling peers instead of using a random outgoing port. While this may allow stricter firewall confiuration or shorter peer lists when interacting with other IPFS implementations, it also opens up the possibility of TCP simultaneous open, which leads to spurious dial errors.
node_name: String
Node name.
node_key: Keypair
Node key.
psk: Option<[u8; 32]>
Pre shared key.
dns: Option<DnsConfig>
Dns config. If no dns config is provided the system defaults will be used.
mdns: Option<MdnsConfig>
Mdns config.
kad: Option<KadConfig>
Kad config.
ping: Option<PingConfig>
Ping config.
identify: Option<IdentifyConfig>
Identify config. Note that the node_name
and
node_key
will overwrite the local_public_key
and
the agent_version
.
gossipsub: Option<GossipsubConfig>
Gossipsub config.
broadcast: Option<BroadcastConfig>
Broadcast config.
bitswap: Option<BitswapConfig>
Bitswap config.
Implementations
sourceimpl NetworkConfig
impl NetworkConfig
Trait Implementations
sourceimpl Debug for NetworkConfig
impl Debug for NetworkConfig
Auto Trait Implementations
impl !RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl !UnwindSafe for NetworkConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more