Struct rust_ipfs::p2p::SwarmOptions
source · pub struct SwarmOptions {Show 16 fields
pub keypair: Keypair,
pub peer_id: PeerId,
pub bootstrap: Vec<Multiaddr>,
pub mdns: bool,
pub mdns_ipv6: bool,
pub relay_server: bool,
pub relay_server_config: Option<RelayConfig>,
pub kad_config: Option<Either<KadConfig, KademliaConfig>>,
pub ping_config: Option<PingConfig>,
pub identify_config: Option<IdentifyConfiguration>,
pub kad_store_config: Option<KadStoreConfig>,
pub pubsub_config: Option<PubsubConfig>,
pub portmapping: bool,
pub keep_alive: bool,
pub relay: bool,
pub dcutr: bool,
}
Expand description
Defines the configuration for an IPFS swarm.
Fields§
§keypair: Keypair
The keypair for the PKI based identity of the local node.
peer_id: PeerId
The peer address of the local node created from the keypair.
bootstrap: Vec<Multiaddr>
The peers to connect to on startup.
mdns: bool
Enables mdns for peer discovery and announcement when true.
mdns_ipv6: bool
enables ipv6 for mdns
relay_server: bool
Relay Server
relay_server_config: Option<RelayConfig>
Relay Server Configuration
kad_config: Option<Either<KadConfig, KademliaConfig>>
Kademlia Configuration
ping_config: Option<PingConfig>
Ping Configuration
identify_config: Option<IdentifyConfiguration>
identify configuration
kad_store_config: Option<KadStoreConfig>
Kad store config Note: Only supports MemoryStoreConfig at this time
pubsub_config: Option<PubsubConfig>
Pubsub configuration,
portmapping: bool
UPnP/PortMapping
keep_alive: bool
Keep alive
relay: bool
Relay client
dcutr: bool
Enables dcutr
Trait Implementations§
source§impl From<&IpfsOptions> for SwarmOptions
impl From<&IpfsOptions> for SwarmOptions
source§fn from(options: &IpfsOptions) -> Self
fn from(options: &IpfsOptions) -> Self
Converts to this type from the input type.