Peerstore class abstract

Peerstore provides a thread-safe store of Peer related information.

Implementers

Constructors

Peerstore()

Properties

addrBook → AddrBook
The address book for this peerstore
no setter
hashCode → int
The hash code for this object.
no setterinherited
keyBook → KeyBook
The key book for this peerstore
no setter
metrics → Metrics
The metrics for this peerstore
no setter
peerMetadata → PeerMetadata
The peer metadata for this peerstore
no setter
protoBook → ProtoBook
The protocol book for this peerstore
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addOrUpdatePeer(PeerId peerId, {List<MultiAddr>? addrs, List<String>? protocols, Map<String, dynamic>? metadata}) → Future<void>
close() → Future<void>
Closes the peerstore and releases any resources.
getPeer(PeerId peerId) → Future<PeerInfo?>
Gets information about a peer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peerInfo(PeerId id) → Future<AddrInfo>
Returns a peer.AddrInfo struct for given peer.ID. This is a small slice of the information Peerstore has on that peer, useful to other services.
peers() → Future<List<PeerId>>
Returns all the peer IDs stored across all inner stores.
removePeer(PeerId id) → Future<void>
Removes all the peer related information except its addresses. To remove the addresses use AddrBook.clearAddrs or set the address ttls to 0.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited