Trait openraft::storage::RaftLogReader
source · pub trait RaftLogReader<C>: OptionalSend + OptionalSync + 'static + Sendwhere
C: RaftTypeConfig,{
// Required method
fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>(
&mut self,
range: RB
) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send;
}
Expand description
A trait defining the interface for a Raft log subsystem.
This interface is accessed read-only from replica streams.
Typically, the log reader implementation as such will be hidden behind an Arc<T>
and
this interface implemented on the Arc<T>
. It can be co-implemented with RaftStorage
interface on the same cloneable object, if the underlying state machine is anyway synchronized.
Required Methods§
sourcefn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>(
&mut self,
range: RB
) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send
fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>( &mut self, range: RB ) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send
Get a series of log entries from storage.
The start value is inclusive in the search and the stop value is non-inclusive: [start, stop)
.
Entry that is not found is allowed.
Object Safety§
This trait is not object safe.