aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/login/mod.rs4
-rw-r--r--src/storage/garage.rs2
-rw-r--r--src/storage/in_memory.rs2
-rw-r--r--src/storage/mod.rs4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/login/mod.rs b/src/login/mod.rs
index e934112..6c948cc 100644
--- a/src/login/mod.rs
+++ b/src/login/mod.rs
@@ -109,8 +109,8 @@ impl Region {
impl Credentials {
- pub fn k2v_client(&self) -> Result<K2vClient> {
- self.storage.k2v_client()
+ pub fn k2v_client(&self) -> Result<RowStore, Error> {
+ self.storage.row.row_store()
}
pub fn s3_client(&self) -> Result<S3Client> {
self.storage.s3_client()
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index f2cc216..c2ca1d3 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -7,7 +7,7 @@ pub struct GrgRef {}
pub struct GrgValue {}
impl IRowBuilder for GrgCreds {
- fn row_store(&self) -> RowStore {
+ fn row_store(&self) -> Result<RowStore, Error> {
unimplemented!();
}
}
diff --git a/src/storage/in_memory.rs b/src/storage/in_memory.rs
index dd255ad..6fa8138 100644
--- a/src/storage/in_memory.rs
+++ b/src/storage/in_memory.rs
@@ -8,7 +8,7 @@ pub struct MemRef {}
pub struct MemValue {}
impl IRowBuilder for MemCreds {
- fn row_store(&self) -> RowStore {
+ fn row_store(&self) -> Result<RowStore, Error> {
unimplemented!();
}
}
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index b5c8518..c20853b 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -54,7 +54,7 @@ pub type AsyncResult<'a, T> = BoxFuture<'a, Result<T, Error>>;
// ------ Row Builder
pub trait IRowBuilder
{
- fn row_store(&self) -> RowStore;
+ fn row_store(&self) -> Result<RowStore, Error>;
}
pub type RowBuilder = Box<dyn IRowBuilder + Send + Sync>;
@@ -63,7 +63,7 @@ pub trait IRowStore
{
fn new_row(&self, partition: &str, sort: &str) -> RowRef;
}
-type RowStore = Box<dyn IRowStore>;
+pub type RowStore = Box<dyn IRowStore>;
// ------- Row Item
pub trait IRowRef