mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 01:10:37 +00:00
LogStore::read takes a reference to namespace (#126)
This commit is contained in:
@@ -28,22 +28,22 @@ pub trait LogStore: Send + Sync + 'static + std::fmt::Debug {
|
||||
// Append a batch of entries atomically and return the offset of first entry.
|
||||
async fn append_batch(
|
||||
&self,
|
||||
ns: Self::Namespace,
|
||||
ns: &Self::Namespace,
|
||||
e: Vec<Self::Entry>,
|
||||
) -> Result<Id, Self::Error>;
|
||||
|
||||
// Create a new `EntryStream` to asynchronously generates `Entry` with ids starting from `id`.
|
||||
async fn read(
|
||||
&self,
|
||||
ns: Self::Namespace,
|
||||
ns: &Self::Namespace,
|
||||
id: Id,
|
||||
) -> Result<SendableEntryStream<Self::Entry, Self::Error>, Self::Error>;
|
||||
|
||||
// Create a new `Namespace`.
|
||||
async fn create_namespace(&mut self, ns: Self::Namespace) -> Result<(), Self::Error>;
|
||||
async fn create_namespace(&mut self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
|
||||
// Delete an existing `Namespace` with given ref.
|
||||
async fn delete_namespace(&mut self, ns: Self::Namespace) -> Result<(), Self::Error>;
|
||||
async fn delete_namespace(&mut self, ns: &Self::Namespace) -> Result<(), Self::Error>;
|
||||
|
||||
// List all existing namespaces.
|
||||
async fn list_namespaces(&self) -> Result<Vec<Self::Namespace>, Self::Error>;
|
||||
|
||||
Reference in New Issue
Block a user