Expand description
Implementation of peer store that stores address information about foreign peers.
§Important Discrepancies
- PeerStore is a local: The peer store itself doesn’t facilitate any information exchange
between peers. You will need other protocols like
libp2p-kadto share addresses you know across the network. - PeerStore is a standalone: Other protocols cannot expect the existence of PeerStore, and need to be manually hooked up to PeerStore in order to obtain information it provides.
§Usage
Compose Behaviour with other NetworkBehaviour,
and the PeerStore will automatically track addresses from
FromSwarm::NewExternalAddrOfPeer
and provide addresses when dialing peers(require extend_addresses_through_behaviour in
DialOpts when dialing).
Other protocols need to be manually hooked up to obtain information from
or provide information to PeerStore.
Modules§
- memory_
store - An in-memory
Storeimplementation.
Structs§
- Behaviour
- Behaviour that maintains a peer address book.
Traits§
- Store
- A store that contains all observed addresses of peers.