pub use crate::distributed::client::DistributedStorageClient;
pub use crate::distributed::error::DistributedStorageError;
pub use crate::distributed::model::{Store, StoreMode};
#[cfg(feature = "ll")]
pub use crate::distributed::client::DistributedStorageClientExtractionError;
mod client;
mod error;
mod model;
#[allow(async_fn_in_trait, dead_code)]
pub trait DistributedStorage {
async fn upsert_store(&self, store: &Store) -> Result<(), DistributedStorageError>;
async fn get_stores(&self) -> Result<Vec<Store>, DistributedStorageError>;
async fn get_keys(
&self,
store: &str,
partition: &str,
) -> Result<Vec<String>, DistributedStorageError>;
async fn get_partitions(&self, store: &str) -> Result<Vec<String>, DistributedStorageError>;
async fn store(
&self,
store: &str,
partition: &str,
key: &str,
mode: &StoreMode,
item: &[u8],
) -> Result<(), DistributedStorageError>;
async fn get(
&self,
store: &str,
partition: &str,
key: &str,
) -> Result<(Vec<u8>, String), DistributedStorageError>;
async fn delete(
&self,
store: &str,
partition: &str,
key: &str,
) -> Result<(), DistributedStorageError>;
async fn delete_partition(
&self,
store: &str,
partition: &str,
) -> Result<(), DistributedStorageError>;
}