mycognosist / solar

A minimal Secure Scuttlebutt replication node.
Other
20 stars 2 forks source link

Add `add_peer` and `remove_peer` methods to connection scheduler #73

Closed mycognosist closed 1 year ago

mycognosist commented 1 year ago

A small change to the API of the connection scheduler.

Instead of having to call ConnectionScheduler::new() with a Vec of (PublicKey, String), peers can now be added and removed via the new add_peer and remove_peer methods after the default instance of the connection scheduler has been created. This has the advantage of allowing peers to be added and removed from the scheduler throughout the node's operation (for example, through messages sent via the broker and acted upon in the message loop of the scheduler).