Struct poldercast::Topology
source · [−]pub struct Topology { /* private fields */ }
Implementations
create a Topology for the given profile
pub fn new_with<LB>(address: SocketAddr, id: &SecretKey, builder: LB) -> Self where
LB: LayerBuilder,
subscribe to the given topic
this function also update our profile
unsubscribe to the given topic
this function also update our profile
call this function if you could not establish an handshake from this peer. This will prevent to use it in the next profile update.
The node will be removed from our layers, but it will not be entirely from our profile pool. We may share it to other nodes we may find it relevant
call this function to validate you were able to connect with the given peer. This will help the system make sure this entry is kept and reuse
Call this function every time you successfully establish an handshake
add a Peer to the Topology
the peer will be considered automatically for all our layers. If the peer seem appropriate it will be added to the view and we will attempt to connect to it later.
However, if the peer was already demoted some times (i.e. the peer was already known and we already know we cannot connect to it for now, it will be required to be “forgotten” or to be “promoted” in order to move away from the naughty list).