Skip to main content

reddb_server/cluster/
mod.rs

1//! Shared cluster identity and membership model.
2
3pub mod archive_recovery;
4pub mod bootstrap_authority;
5pub mod commit_resolution;
6pub mod control_plane;
7pub mod cross_range;
8pub mod drain;
9pub mod hot_mirror_failover;
10pub mod identity;
11pub mod join;
12pub mod membership;
13pub mod move_range;
14pub mod ownership;
15pub mod ownership_force;
16pub mod ownership_lease;
17pub mod ownership_transition;
18pub mod placement;
19pub mod routing;
20pub mod slot;
21pub mod supervisor;
22pub mod topology;
23
24pub use archive_recovery::{
25    recover_archive_replica, ArchiveRecoveryError, ArchiveRecoveryMode, ArchiveRecoveryOutcome,
26    ArchiveRecoveryRequest, ArchiveRecoveryRpoEvidence, ArchivedRangeReplica,
27    RestoredArchiveReplica, SkippedDataEvidence,
28};
29pub use bootstrap_authority::{
30    authorize as authorize_cluster_bootstrap, authorize_vault_bootstrap, is_cluster_shaped,
31    plan_vault_bootstrap, AuthBootstrapInput, BootstrapDisposition, VaultBootstrapPlan,
32};
33pub use commit_resolution::{
34    is_local_ack, resolve_commit_policy, CollectionDataModel, CommitPolicyResolution,
35    CommitPolicyViolation, FailoverEligibility, GuardrailDisposition, HaIntent, ResolutionSource,
36};
37pub use control_plane::{
38    ControlPlaneConsensus, ControlPlaneEntry, ControlPlaneError, ControlPlaneIndex,
39    ControlPlaneTerm, DurableVoteState, MembershipChange, OwnershipTransition,
40    SingleNodeControlPlane,
41};
42pub use cross_range::{
43    ConsistentReadLeg, ConsistentReadPlan, ConsistentReadReject, ExactClaimPlan, ExactClaimReject,
44    GlobalReadWatermark, KeyTarget, PinnedTarget, RangeParticipant, ReadFanout, ReadFanoutBudget,
45    ReadFanoutPolicy, ReadFanoutReject, ReadFanoutTrace, ReadLeg, ResolvedTarget,
46    WriteTransactionPlan, WriteTransactionReject, WriterParticipation,
47};
48pub use drain::{
49    drain_status, plan_drain, plan_force_remove, run_drain, run_force_remove, DrainBlock,
50    DrainBlockReason, DrainOutcome, DrainPlan, DrainStatus, DrainStep, ForceCapability,
51    ForceRemoveAudit, ForceRemoveOrder, ForceRemoveOrderError, ForceRemovePlan, ForceRemoveResult,
52    ForcedBlock, ForcedPromotion, OwnedHandoff, RemovalRejection, ReplicaEvacuation,
53};
54pub use hot_mirror_failover::{
55    execute_hot_mirror_failover, plan_hot_mirror_failover, HotMirrorEpochEvidence,
56    HotMirrorFailoverCandidate, HotMirrorFailoverError, HotMirrorFailoverEvidence,
57    HotMirrorFailoverPlan, HotMirrorInputs, HotMirrorRangeEvidence, WatermarkOutcome,
58};
59pub use identity::{
60    ClusterVoterIdentity, NodeIdentity, NodeIdentityError, ReplicationPeerIdentity,
61};
62pub use join::{ControlPlaneSnapshot, JoinGrant, JoinRejection, JoinRequest, SeedAuthority};
63pub use membership::{
64    AdmissionOutcome, BaselineAssessment, ClusterId, ClusterIdError, ClusterMember, MemberKind,
65    MemberState, MembershipCatalog, RESILIENT_DATA_MEMBER_BASELINE,
66};
67pub use move_range::{
68    classify_move, recover_interrupted_move, split_range, MoveError, MoveKind, MovePhase,
69    MoveRange, MoveRecovery, RangeSplit, SplitError, SplitPolicy, SplitSide,
70};
71pub use ownership::{
72    CatalogError, CatalogVersion, CollectionGroupAuthority, CollectionGroupId,
73    CollectionGroupIdError, CollectionId, CollectionIdError, HotMirrorCandidate,
74    HotMirrorPromotion, HotMirrorPromotionRefusal, OwnershipEpoch, PlacementAuthorityCatalog,
75    PlacementAuthorityError, PlacementAuthorityId, PlacementAuthorityIdError, PlacementMetadata,
76    RangeBound, RangeBounds, RangeBoundsError, RangeId, RangeOwnership, RangeRole,
77    RangeWriteReject, ReplicaRole, ShardKeyMode, ShardOwnershipCatalog, UpdateOutcome,
78};
79pub use ownership_force::{
80    force_transition, EmptyOperatorReason, ForceDenial, ForceFailure, ForceTransitionCapability,
81    ForcedTransitionAudit, ForcedTransitionDisposition, ForcedTransitionRequest, OperatorReason,
82};
83pub use ownership_lease::{
84    admit_durable_write, DurableWriteReject, FenceReason, LeaseFenceRejection, LeasedOwner,
85    OwnerWriteMode, OwnershipLease, RangeRequest, SupervisorTerm,
86};
87pub use ownership_transition::{
88    prepare, run_transition, validate_archive_recovery_source, ArchiveRecoveryEvidence,
89    ArchiveRecoveryRejection, CatchUpEvidence, CommitWatermark, InvalidCandidateReason,
90    PreparedTransition, TransitionError, TransitionKind, TransitionOutcome, TransitionRejection,
91    TransitionRequest,
92};
93pub use placement::{
94    AuthorityScopedPlannedMove, AuthorityScopedRebalancePlan, CollectionGroupPlacementAuthority,
95    HotspotRange, MemberCapacity, MoveReason, PlacementPolicy, PlacementSignals, PlannedMove,
96    RangeLoad, RebalancePlan, WeightedPlacementPlanner, NEUTRAL_OPERATOR_WEIGHT,
97};
98pub use routing::{
99    RedirectReason, RequestOperation, RouteDecision, RoutedRequest, RoutingHint, RoutingPolicy,
100    DEFAULT_MAX_FORWARD_PAYLOAD,
101};
102pub use slot::{
103    hash_shard_key_to_range_key, hash_shard_key_to_slot, HashSlot, HashSlotError,
104    PRODUCTION_HASH_SLOT_COUNT,
105};
106pub use supervisor::{
107    BlockedFailover, BlockedReason, ClusterSignals, ClusterSupervisor, FailoverPlan, HealthClass,
108    HealthPolicy, HealthScore, MemberSignals, PlannedPromotion,
109};
110pub use topology::{
111    ClientTopology, HintOutcome, RefreshOutcome, TopologyAuthority, TopologyRange,
112    TopologySnapshot, TopologyUpdate,
113};