feat: impl Logstore::read by LogFile::create_stream (#124)

* feat: bridge LogStore::read to LogFile::create_stream

* fix some CR comments
This commit is contained in:
Lei, Huang
2022-08-02 11:14:28 +08:00
committed by GitHub
parent 96b4ed01f7
commit 868098d2b7
5 changed files with 40 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug {
/// Append an `Entry` to WAL with given namespace
async fn append(
&self,
ns: Self::Namespace,
ns: &Self::Namespace,
mut e: Self::Entry,
) -> Result<Self::AppendResponse, Self::Error>;
@@ -32,7 +32,7 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug {
e: Vec<Self::Entry>,
) -> Result<Id, Self::Error>;
// Create a new `EntryStream` to asynchronously generates `Entry`.
// Create a new `EntryStream` to asynchronously generates `Entry` with ids starting from `id`.
async fn read(
&self,
ns: Self::Namespace,