Skip to main content

laminar_core/cluster/control/
mod.rs

1//! Cluster control plane: leader election, assignment snapshots, and
2//! barrier coordination.
3
4pub mod barrier;
5pub mod catalog_manifest;
6pub mod controller;
7pub mod leader;
8pub mod leader_lease;
9mod lease_deadline;
10mod namespace_proof;
11pub mod process_lease;
12pub mod snapshot;
13pub mod topology;
14
15pub use crate::checkpoint::{
16    CheckpointAssignmentAdoption, CheckpointAssignmentFence, CheckpointParticipant, LeaderProof,
17    LeaderProofOwner,
18};
19pub use barrier::{
20    BarrierAck, BarrierAckDisposition, BarrierAnnouncement, BarrierCoordinator, ClusterKv,
21    InMemoryKv, Phase, QuorumOutcome, ACK_KEY, ANNOUNCEMENT_KEY,
22};
23#[cfg(feature = "cluster")]
24pub use controller::{CheckpointPrepareObservation, PeriodicCheckpointHold};
25pub use controller::{
26    ClusterController, LocalProcessAuthorityEvidence, LocalProcessAuthorityEvidenceError,
27    LocalProcessAuthorityIdentity, RecoverPhase, RecoveryAdmissionSnapshot, RecoveryAnnouncement,
28    RecoveryControlError, RecoveryFault, RecoveryFaultDisposition, RecoveryFaultReportOutcome,
29    RecoveryFaultRequest, RecoveryRound, RecoveryRoundId, RecoveryStoppedReport,
30    ReleaseCommitStatus,
31};
32// Re-exported from `crate::checkpoint_decision` (lives outside the
33// cluster gate because single-instance also relies on it for crash-safe
34// 2PC). Callers that already qualify with `cluster::control::…` keep
35// working.
36pub use crate::checkpoint_decision::{CheckpointDecisionStore, DecisionError};
37pub use catalog_manifest::{
38    CatalogManifest, CatalogManifestEntry, CatalogManifestError, CatalogManifestRef,
39    CatalogManifestStore, CatalogObjectKind, CatalogSealOutcome,
40};
41pub use leader::leader_of;
42pub use leader_lease::{
43    lease_grants_leadership, lease_grants_proof, AssignmentDrainDecision, AssignmentDrainVerdict,
44    AssignmentRecoveryDecision, ClusterArtifactCleanupCursor, ClusterArtifactCleanupPhase,
45    ClusterAttemptStatus, ClusterCheckpointAuthorityError, ClusterCommitHead,
46    ClusterOutcomeInventory, ClusterOutcomeRetentionBoundary, LeaderCandidacy, LeaderLease,
47    LeaderLeaseConfig, LeaderLeaseManager, LeaderLeaseObservation, LeaderLeaseOwner,
48    LeaderLeaseStore, LeaseError, LeaseOutcome, RecordAssignmentDrainDecisionResult,
49    RecordAssignmentRecoveryDecisionResult, SubscriptionReplayPin, SubscriptionReplayPinAcquire,
50    SUBSCRIPTION_REPLAY_PIN_RENEW_INTERVAL,
51};
52pub use lease_deadline::LeaseDeadline;
53pub use namespace_proof::{
54    prove_shared_object_store_namespaces, NamespaceProofError, VerifiedClusterNamespaces,
55    MAX_SHARED_NAMESPACE_PROOF_TIMEOUT,
56};
57pub use process_lease::{
58    ProcessLease, ProcessLeaseAuthority, ProcessLeaseConfig, ProcessLeaseError, ProcessLeaseFence,
59    ProcessLeaseManager, ProcessLeaseObservation, ProcessLeaseOutcome, ProcessLeaseStore,
60};
61pub use snapshot::{
62    AssignmentSnapshot, AssignmentSnapshotRef, AssignmentSnapshotStore, RotateOutcome,
63    SnapshotError,
64};
65pub use topology::{
66    ClusterTopologyValidation, LegacyTopologyBaseline, TopologyAbortReason, TopologyActivation,
67    TopologyAdmissionPhase, TopologyAdmissionPlan, TopologyAdmissionStatus,
68    TopologyAdoptionOutcome, TopologyCatalogState, TopologyCheckpointCut, TopologyCommit,
69    TopologyCompatibilityRef, TopologyCutCommit, TopologyError, TopologyInstallationReceipt,
70    TopologyJournalUsage, TopologyMigrationRoot, TopologyMigrationRootBinding,
71    TopologyMigrationRootRef, TopologyOperationId, TopologyParticipantCertificate, TopologyPlanRef,
72    TopologyPreparation, TopologyPreservedObject, TopologyRecoveryBinding, TopologyRecoveryCut,
73    TopologyRecoveryInput, TopologyRelease, TopologyRestoreInput, TopologySourceInitialization,
74    TopologySubscriptionRoot, TopologyTargetPreparationReceipt, TopologyVersion,
75    MAX_TOPOLOGY_OPERATIONS, MAX_TOPOLOGY_ROOT_MANIFEST_BYTES, MAX_TOPOLOGY_SOURCE_CHANNELS,
76    TOPOLOGY_COMMIT_PROTOCOL_VERSION, TOPOLOGY_INSTALLATION_PROTOCOL_VERSION,
77    TOPOLOGY_PREPARATION_PROTOCOL_VERSION, TOPOLOGY_PROTOCOL_VERSION,
78    TOPOLOGY_RECOVERY_PROTOCOL_VERSION, TOPOLOGY_SUBMISSION_PROTOCOL_VERSION,
79    TOPOLOGY_TARGET_PREPARATION_PROTOCOL_VERSION,
80};
81
82#[cfg(feature = "cluster")]
83pub mod chitchat_kv;
84#[cfg(feature = "cluster")]
85pub use chitchat_kv::ChitchatKv;
86
87#[cfg(feature = "cluster")]
88pub mod tls;
89#[cfg(feature = "cluster")]
90pub use tls::{claim_cluster_plaintext, set_cluster_tls, ClusterTls};