Struct everscale_network::dht::Node

source ·
pub struct Node { /* private fields */ }
Expand description

Kademlia-like DHT node

Implementations

Create new DHT node on top of ADNL node

Configuration

Instant metrics

Underlying ADNL node

Adds new peer to DHT or explicitly marks existing as good. Returns new peer short id

Checks whether the specified peer was marked as bad

Sends ping query to the given peer

Returns an entry interface for manipulating DHT values

Queries given peer for at most k DHT nodes with the same affinity as local_id <-> peer_id

Asks each known DHT node for other nodes, extending current nodes set

Searches overlay nodes and their ip addresses.

NOTE: For the sake of speed it uses only a subset of nodes, so results may vary between calls.

Searches for the first stored IP address for the given peer id

Returns a future which stores value into multiple DHT nodes.

See Node::entry for more convenient API

Stores given overlay node into multiple DHT nodes

Returns and error if stored value is incorrect

Stores given socket address into multiple DHT nodes

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the indexed conversion.
Should always be Self
Consumes the current HList and returns an HList with the requested shape. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more