pub struct BarrierCoordinator { /* private fields */ }Expand description
Cross-instance barrier coordination.
Implementations§
Source§impl BarrierCoordinator
impl BarrierCoordinator
Sourcepub fn set_leader_lease_store(&self, store: Arc<LeaderLeaseStore>)
pub fn set_leader_lease_store(&self, store: Arc<LeaderLeaseStore>)
Install the durable authority used to validate clustered reversible barrier phases.
Without it, clustered Prepare and Aligned traffic fails closed.
Exact durable authority installed for clustered barriers and checkpoint decisions.
Embedded and single-node runtimes do not call this path. A cluster runtime that omitted authority wiring fails closed instead of falling back to standalone outcome objects.
§Errors
Returns NotConfigured when durable cluster checkpoint authority is not installed.
Sourcepub fn set_leader_election(
&mut self,
instance_id: NodeId,
members_rx: Receiver<Vec<NodeInfo>>,
leader_eligible: Arc<AtomicBool>,
)
pub fn set_leader_election( &mut self, instance_id: NodeId, members_rx: Receiver<Vec<NodeInfo>>, leader_eligible: Arc<AtomicBool>, )
Configure membership used to target active barrier peers. Gossip election is not a barrier authority boundary.
Sourcepub fn prepare_received_at(
&self,
prepare: &BarrierAnnouncement,
) -> Option<Instant>
pub fn prepare_received_at( &self, prepare: &BarrierAnnouncement, ) -> Option<Instant>
Local monotonic receipt time for this exact gRPC Prepare.
Sourcepub async fn start_server(
&self,
bind_addr: SocketAddr,
advertise_host: Option<String>,
) -> Result<SocketAddr, String>
pub async fn start_server( &self, bind_addr: SocketAddr, advertise_host: Option<String>, ) -> Result<SocketAddr, String>
Bind and run the follower’s direct gRPC barrier sync server.
§Errors
Returns an error string on bind or socket address retrieval failures.
Sourcepub async fn confirm_remote_leader_proof(
&self,
proof: &LeaderProof,
deadline: Instant,
) -> Result<bool, String>
pub async fn confirm_remote_leader_proof( &self, proof: &LeaderProof, deadline: Instant, ) -> Result<bool, String>
Ask one exact remote process to confirm a proof already read from durable authority.
The response echoes only a fresh challenge id. It never returns a process-local or durable fencing token.
§Errors
Fails when the proof, peer address, RPC, acknowledgement, or deadline is invalid.
Sourcepub async fn announce(&self, ann: &BarrierAnnouncement) -> Result<(), String>
pub async fn announce(&self, ann: &BarrierAnnouncement) -> Result<(), String>
Leader-side announcement for terminal, aligned, and assignment-less local/KV phases.
§Errors
Assignment-certified Prepare must use Self::announce_prepare. Assignment-certified
reversible phases require a started leased barrier server, and Aligned requires the exact
Prepare to have completed Self::wait_for_quorum. Other errors propagate validation,
encoding, and publication failures.
Sourcepub async fn announce_prepare(
&self,
ann: &BarrierAnnouncement,
quorum_window: Duration,
) -> Result<(), String>
pub async fn announce_prepare( &self, ann: &BarrierAnnouncement, quorum_window: Duration, ) -> Result<(), String>
Durably publish one assignment-certified Prepare and immediately start its direct fan-out.
§Errors
Rejects a different phase, an assignment-less announcement, a zero/indivisible quorum window, malformed authority, conflicting in-flight Prepare state, or publication failure.
Sourcepub fn announcement_watch(
&self,
) -> Option<Receiver<Option<BarrierAnnouncement>>>
pub fn announcement_watch( &self, ) -> Option<Receiver<Option<BarrierAnnouncement>>>
Watch over gRPC-delivered announcements, for push-driven waits
(the decision wait and the Aligned resume gate). None until
the gRPC server is started — gossip-KV-only deployments fall
back to polling the merged gossip history.
Sourcepub async fn wait_for_quorum(
&self,
prepare: &BarrierAnnouncement,
expected: &[NodeId],
deadline: Duration,
) -> QuorumOutcome
pub async fn wait_for_quorum( &self, prepare: &BarrierAnnouncement, expected: &[NodeId], deadline: Duration, ) -> QuorumOutcome
Leader-side: wait until quorum or deadline.
Trait Implementations§
Source§impl Debug for BarrierCoordinator
impl Debug for BarrierCoordinator
Source§impl Drop for BarrierCoordinator
impl Drop for BarrierCoordinator
Auto Trait Implementations§
impl !Freeze for BarrierCoordinator
impl !RefUnwindSafe for BarrierCoordinator
impl !UnwindSafe for BarrierCoordinator
impl Send for BarrierCoordinator
impl Sync for BarrierCoordinator
impl Unpin for BarrierCoordinator
impl UnsafeUnpin for BarrierCoordinator
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].