This repository was archived by the owner on Oct 23, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,20 @@ mod transport;
17
17
pub use addr:: { MultiaddrWithPeerId , MultiaddrWithoutPeerId } ;
18
18
pub use { behaviour:: KadResult , swarm:: Connection } ;
19
19
20
+ /// An IPFS swarm.
20
21
pub type TSwarm < T > = Swarm < behaviour:: Behaviour < T > > ;
21
22
23
+ /// Defines the configuration for an IPFS swarm.
22
24
pub struct SwarmOptions {
25
+ /// The keypair for the PKI based identity of the local node.
23
26
pub keypair : Keypair ,
27
+ /// The peer address of the local node created from the keypair.
24
28
pub peer_id : PeerId ,
29
+ /// The peers to connect to on startup.
25
30
pub bootstrap : Vec < ( Multiaddr , PeerId ) > ,
31
+ /// Enables mdns for peer discovery and announcement when true.
26
32
pub mdns : bool ,
33
+ /// Custom Kademlia protocol name.
27
34
pub kad_protocol : Option < String > ,
28
35
}
29
36
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use std::time::Duration;
15
15
pub struct Connection {
16
16
/// The connected peer along with its address.
17
17
pub addr : MultiaddrWithPeerId ,
18
- /// Latest ping report on any of the connections
18
+ /// Latest ping report on any of the connections.
19
19
pub rtt : Option < Duration > ,
20
20
}
21
21
You can’t perform that action at this time.
0 commit comments