Skip to main content

Crate raft_hpc_core

Crate raft_hpc_core 

Source
Expand description

§raft-hpc-core

Shared Raft consensus infrastructure for HPC systems. Extracted from lattice-quorum with minimal parameterization — each application provides its own TypeConfig via openraft::declare_raft_types!.

§What’s generic (in this crate)

  • Log stores (in-memory, file-backed, polymorphic variant)
  • gRPC transport (network factory, transport server)
  • In-memory network (for testing)
  • State machine (snapshot management, apply dispatch)
  • Backup (export, verify, restore)

§What’s application-specific (NOT in this crate)

  • TypeConfig declaration (openraft::declare_raft_types!)
  • Command and CommandResponse enums
  • Application state (GlobalState, JournalState, etc.)
  • StateMachineState::apply() implementation
  • Client trait implementations
  • Factory functions (create_quorum, etc.)

Re-exports§

pub use backup::BackupMetadata;
pub use backup::export_backup;
pub use backup::restore_backup;
pub use backup::verify_backup;
pub use log_store_variant::LogReaderVariant;
pub use log_store_variant::LogStoreVariant;
pub use network::MemNetworkFactory;
pub use persistent_store::FileLogStore;
pub use state_machine::HpcStateMachine;
pub use store::MemLogStore;
pub use transport::GrpcNetworkFactory;
pub use transport::PeerTlsConfig;
pub use transport_server::RaftTransportServer;

Modules§

backup
Backup export, verify, and restore for Raft state.
log_store_variant
Polymorphic log store that switches between in-memory and file-backed storage.
network
In-memory Raft network for testing.
persistent_store
File-backed log store for Raft.
proto
Generated protobuf types for the Raft transport service.
state_machine
Generic Raft state machine with persistent snapshot support.
store
In-memory log storage for Raft.
transport
gRPC-based Raft network transport for multi-process clusters.
transport_server
Tonic server handler for Raft RPCs.

Traits§

BackupMetadataSource
Application state that supports backup metadata extraction.
StateMachineState
Application state managed by the Raft state machine.