openraft-backed ConsensusDriver for tsoracle.
This crate replicates the TSO high-water mark across an openraft cluster
and exposes the result via the [tsoracle_consensus::ConsensusDriver]
trait. The caller supplies a pre-built [openraft::Raft] handle (with its
own RaftNetworkFactory and RaftLogStorage); this crate provides the
RaftTypeConfig, the log-entry type, the [HighWaterStateMachine] with
a pluggable [SnapshotStore] (defaulting to in-memory, with an optional
RocksdbSnapshotStore behind the rocksdb-snapshot-store feature), and
the trait bridge.
Layering
- [
log_entry] defines the single command type replicated through the log. - [
state_machine] implementsopenraft::storage::RaftStateMachineover an in-memoryu64counter with bincode snapshots. - [
type_config] declares theRaftTypeConfigviatsoracle_openraft_toolkit::declare_raft_types_ext!. - [
host] declares theOpenraftHighWaterHosttrait services implement to plug their consensus into the driver. - [
standalone] supplies the bundled host that owns its own raft cluster and the [HighWaterStateMachine]. - [
driver] wraps theRafthandle and the state machine into theConsensusDriverimpl.