aboutsummaryrefslogtreecommitdiff
path: root/src/server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-23 20:25:45 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-23 20:25:45 +0000
commit51fb3799a153a0db990fc74a37563ec612e20fc2 (patch)
tree65d8c192ab45b878ffc7af1e60f7b0106782a9ae /src/server.rs
parent4ef84a0558c0bf6641094e762ede0c962781204d (diff)
downloadgarage-51fb3799a153a0db990fc74a37563ec612e20fc2.tar.gz
garage-51fb3799a153a0db990fc74a37563ec612e20fc2.zip
Key management admin commands
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server.rs b/src/server.rs
index de04615f..0724630a 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -19,6 +19,7 @@ use crate::table::*;
use crate::store::block::*;
use crate::store::block_ref_table::*;
use crate::store::bucket_table::*;
+use crate::store::key_table::*;
use crate::store::object_table::*;
use crate::store::version_table::*;
@@ -35,6 +36,8 @@ pub struct Garage {
pub block_manager: Arc<BlockManager>,
pub bucket_table: Arc<Table<BucketTable, TableFullReplication>>,
+ pub key_table: Arc<Table<KeyTable, TableFullReplication>>,
+
pub object_table: Arc<Table<ObjectTable, TableShardedReplication>>,
pub version_table: Arc<Table<VersionTable, TableShardedReplication>>,
pub block_ref_table: Arc<Table<BlockRefTable, TableShardedReplication>>,
@@ -138,6 +141,17 @@ impl Garage {
)
.await;
+ info!("Initialize key_table_table...");
+ let key_table = Table::new(
+ KeyTable,
+ control_rep_param.clone(),
+ system.clone(),
+ &db,
+ "key".to_string(),
+ rpc_server,
+ )
+ .await;
+
info!("Initialize Garage...");
let garage = Arc::new(Self {
config,
@@ -146,6 +160,7 @@ impl Garage {
block_manager,
background,
bucket_table,
+ key_table,
object_table,
version_table,
block_ref_table,