Skip to main content

Crate atomr_cluster_tools

Crate atomr_cluster_tools 

Source
Expand description

atomr-cluster-tools. src/contrib/cluster/.

Structs§

AckHandle
Handle handed back from ClusterKillSwitch::register_guarded that a party uses to acknowledge it has quiesced.
ClusterClient
ClusterClientSettings
Settings for a ClusterClient.
ClusterKillSwitch
Distributed emergency-halt latch. Cheap to clone via Arc.
ClusterPubSub
Mediator that augments a local DistributedPubSub with a cross-node topic table + transport. Clusters publish via ClusterPubSub::publish_remote which fans out to all nodes that have advertised the topic; receivers route the payload to local subscribers using the codec registry.
ClusterReceptionist
ClusterSingletonManager
Decides which node hosts the singleton based on oldest up-member — a hook is provided so tests can simulate handover without wiring the full cluster.
ClusterSingletonProxy
Proxy that routes messages to the current singleton, buffering during handover.
DistributedPubSub
FenceToken
Monotonic fencing token (FR-7c). Bumped every time this node assumes the singleton, so stale writers from a prior incarnation can be rejected by comparing tokens. Ord so the highest token wins.
HaltToken
Token returned by ClusterKillSwitch::engage, identifying the engage operation (monotonic, per-process).
HandoffState
Opaque serialized external session carried across a handover.
KillSwitchQuorumObserver
Adapter wiring FR-7 → FR-5: a QuorumObserver that engages the kill switch when quorum is lost. Drop this into SbrRuntime::with_observer to halt the node on partition loss.
QuiescenceReport
Result of ClusterKillSwitch::await_quiescence.
ResetAuthorization
Two-person authorization required to ClusterKillSwitch::reset.

Enums§

ClusterClientError
HaltPdu
Wire shape of a cross-node kill-switch exchange. Mirrors the MediatorPdu pattern used by ClusterPubSub: an opaque, serializable message that a HaltTransport carries to a peer and that the peer feeds back via ClusterKillSwitch::apply_pdu.
HaltReason
Why the kill switch was engaged. Recorded alongside the latch for post-incident analysis.
MediatorPdu
Wire shape of a cross-node mediator exchange.
ResetError
Error returned by ClusterKillSwitch::reset when authorization is invalid.
SingletonState
Singleton lifecycle state.

Traits§

HaltGuarded
A party that must be brought to a safe stop when the switch engages. on_halt should stop accepting new work and prepare to acknowledge quiescence; it must not block for long.
HaltTransport
Pluggable transport for cross-node kill-switch fan-out. Sends a HaltPdu to a peer node identified by an opaque string node id (typically Address::to_string()); the receiver feeds inbound PDUs back into its local switch via ClusterKillSwitch::apply_pdu.
MediatorTransport
Pluggable transport for the cross-node mediator. Sends an outbound MediatorPdu to a peer node, identified by an opaque string node id (typically Address::to_string()). The transport is responsible for the wire round-trip; on the receiver side, the inbound PDU is fed back into the local mediator via ClusterPubSub::apply_pdu.
SingletonHandoff
Hook for migrating external state (e.g. a broker session, a lease, an open file) when the singleton moves between nodes (FR-7c).