Routing class abstract

Routing is the combination of different routing types supported by libp2p. It can be satisfied by a single item (such as a DHT) or multiple different pieces that are more optimized to each task.

Implemented types

Constructors

Routing.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bootstrap() Future<void>
Bootstrap allows callers to hint to the routing system to get into a Bootstrapped state and remain there. It is not a synchronous call.
findPeer(PeerId id, {RoutingOptions? options}) Future<AddrInfo?>
FindPeer searches for a peer with given ID, returns a peer.AddrInfo with relevant addresses.
inherited
findProvidersAsync(CID cid, int count) Stream<AddrInfo>
Search for peers who are able to provide a given key
inherited
getValue(String key, RoutingOptions? options) Future<Uint8List?>
GetValue searches for the value corresponding to given Key.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
provide(CID cid, bool announce) Future<void>
Provide adds the given cid to the content routing system. If 'true' is passed, it also announces it, otherwise it is just kept in the local accounting of which objects are being provided.
inherited
putValue(String key, Uint8List value, {RoutingOptions? options}) Future<void>
PutValue adds value corresponding to given Key.
inherited
searchValue(String key, RoutingOptions? options) Stream<Uint8List>
SearchValue searches for better and better values from this value store corresponding to the given Key.
inherited
toString() String
A string representation of this object.
inherited

Operators

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