Refactor health check and add ability to return it in json

This commit is contained in:
Alex Auvolat
2022-12-05 15:28:57 +01:00
parent 2065f011ca
commit 280d1be7b1
7 changed files with 156 additions and 95 deletions
+2 -7
View File
@@ -8,10 +8,10 @@ use garage_util::background::*;
use garage_util::config::*;
use garage_util::error::*;
use garage_rpc::replication_mode::ReplicationMode;
use garage_rpc::system::System;
use garage_block::manager::*;
use garage_table::replication::ReplicationMode;
use garage_table::replication::TableFullReplication;
use garage_table::replication::TableShardedReplication;
use garage_table::*;
@@ -167,12 +167,7 @@ impl Garage {
.expect("Invalid replication_mode in config file.");
info!("Initialize membership management system...");
let system = System::new(
network_key,
background.clone(),
replication_mode.replication_factor(),
&config,
)?;
let system = System::new(network_key, background.clone(), replication_mode, &config)?;
let data_rep_param = TableShardedReplication {
system: system.clone(),