pub struct ClusterSync { /* private fields */ }Expand description
Propagates channel subscriptions and fans published messages out across the cluster via beamr process groups (SRV-005 R5/R6).
Implementations§
Source§impl ClusterSync
impl ClusterSync
Sourcepub fn new(
pg: Arc<PgRegistry>,
atoms: Arc<AtomTable>,
connections: ConnectionManager,
local_node: Atom,
resolver: Arc<ClusterResolver>,
) -> Self
pub fn new( pg: Arc<PgRegistry>, atoms: Arc<AtomTable>, connections: ConnectionManager, local_node: Atom, resolver: Arc<ClusterResolver>, ) -> Self
Builds a sync over the scheduler’s pg registry and distribution
connections. local_node is this node’s distribution atom (interned from
the configured node name in the SAME atom table).
Sourcepub fn remote_targets(&self, channel: &str) -> Vec<RemoteMember>
pub fn remote_targets(&self, channel: &str) -> Vec<RemoteMember>
Remote members of channel’s group (for publish fan-out and tests).
Source§impl ClusterSync
impl ClusterSync
Sourcepub fn on_peer_join(&self, node: Atom)
pub fn on_peer_join(&self, node: Atom)
R5 backfill: re-advertise every local subscription to a newly-joined peer.
Sourcepub fn on_peer_leave(&self, node: Atom)
pub fn on_peer_leave(&self, node: Atom)
R6 is automatic (beamr purges the departed node’s remote members via its connection-down hook). This logs the cleanup for operators.
Trait Implementations§
Source§impl Clone for ClusterSync
impl Clone for ClusterSync
Source§fn clone(&self) -> ClusterSync
fn clone(&self) -> ClusterSync
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ClusterObserver for ClusterSync
impl ClusterObserver for ClusterSync
Source§fn on_subscribe(&self, channel: &str, subscriber_pid: u64)
fn on_subscribe(&self, channel: &str, subscriber_pid: u64)
A local subscriber (beamr pid
subscriber_pid) joined channel.Source§fn on_unsubscribe(&self, channel: &str, subscriber_pid: u64)
fn on_unsubscribe(&self, channel: &str, subscriber_pid: u64)
A local subscriber (beamr pid
subscriber_pid) left channel.Source§fn on_publish(&self, channel: &str, envelope: &Envelope)
fn on_publish(&self, channel: &str, envelope: &Envelope)
A message was published to
channel on this node; the observer may fan it
out to remote subscribers.Auto Trait Implementations§
impl !RefUnwindSafe for ClusterSync
impl !UnwindSafe for ClusterSync
impl Freeze for ClusterSync
impl Send for ClusterSync
impl Sync for ClusterSync
impl Unpin for ClusterSync
impl UnsafeUnpin for ClusterSync
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
Mutably borrows from an owned value. Read more