pub struct AnnouncerConfig { /* private fields */ }Expand description
Configuration of the Announcer.
Implementations§
Source§impl AnnouncerConfig
impl AnnouncerConfig
Sourcepub fn private(
local: PublicKey,
replicas: ReplicationFactor,
network: PrivateNetwork,
) -> AnnouncerConfig
pub fn private( local: PublicKey, replicas: ReplicationFactor, network: PrivateNetwork, ) -> AnnouncerConfig
Setup a private network AnnouncerConfig, populating the
AnnouncerConfig’s preferred seeds with the allowed set from the
PrivateNetwork.
replicas is the target number of seeds the Announcer should reach
before stopping.
local is the NodeId of the local node, to ensure it is
excluded from the Announcer process.
Sourcepub fn public(
local: PublicKey,
replicas: ReplicationFactor,
preferred_seeds: BTreeSet<PublicKey>,
synced: BTreeSet<PublicKey>,
unsynced: BTreeSet<PublicKey>,
) -> AnnouncerConfig
pub fn public( local: PublicKey, replicas: ReplicationFactor, preferred_seeds: BTreeSet<PublicKey>, synced: BTreeSet<PublicKey>, unsynced: BTreeSet<PublicKey>, ) -> AnnouncerConfig
Setup a public AnnouncerConfig.
preferred_seeds is the target set of preferred seeds that Announcer should
attempt to synchronize with.
synced and unsynced are the set of nodes that are currently
synchronized and un-synchronized with, respectively.
replicas is the target number of seeds the Announcer should reach
before stopping.
local is the NodeId of the local node, to ensure it is
excluded from the Announcer process.
Trait Implementations§
Source§impl Clone for AnnouncerConfig
impl Clone for AnnouncerConfig
Source§fn clone(&self) -> AnnouncerConfig
fn clone(&self) -> AnnouncerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AnnouncerConfig
impl RefUnwindSafe for AnnouncerConfig
impl Send for AnnouncerConfig
impl Sync for AnnouncerConfig
impl Unpin for AnnouncerConfig
impl UnwindSafe for AnnouncerConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more