pub struct PeerManager { /* private fields */ }
Expand description

The PeerManager is in charge of keeping track of peers and their reference counts, as well as requesting connections from the ConnectionManager. If a peer has disconnected, the PeerManager will also try the peer’s other endpoints until one is successful.

Implementations

👎 Deprecated since 0.5.1:

Please use PeerManagerBuilder instead

Creates a new PeerManager

Arguments
  • connector - The Connector to the ConnectionManager that will handle the connections requested by the PeerManager
  • max_retry_attempts - The number of retry attempts for an active endpoint before the PeerManager will try other endpoints associated with a peer
  • retry_interval - How often (in seconds) the Pacemaker should notify the PeerManager to retry pending peers
  • identity - The unique ID of the node this PeerManager belongs to
  • strict_ref_counts - Determines whether or not to panic when attempting to remove a reference to peer that is not referenced.

Construct a new PeerManagerBuilder for creating a new PeerManager instance.

👎 Deprecated since 0.5.1:

Please use connector() instead. The PeerManagerBuilder starts up the PeerManager now

Starts the PeerManager

Starts up a thread that will handle incoming requests to add, remove and get peers. Also handles notifications from the ConnectionManager.

Returns a PeerManagerConnector that can be used to send requests to the PeerManager.

Trait Implementations

Instructs the component to begin shutting down. Read more

Waits until the the component has completely shutdown. Read more

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

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

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.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

Should always be Self

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