diff --git a/src/bin/main.rs b/src/bin/main.rs index 3c9e2a0..4059611 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -23,7 +23,7 @@ use dcache::DcacheTypeConfig; use openraft::Raft; use tracing_subscriber::EnvFilter; -pub type DcacheRaft = Raft; +//pub type DcacheRaft = Raft; #[derive(Parser, Clone, Debug)] #[clap(author, version, about, long_about = None)] @@ -33,6 +33,15 @@ pub struct Opt { #[clap(long)] pub http_addr: String, + + #[clap(long)] + pub introducer_id: u64, + + #[clap(long)] + pub introducer_addr: String, + + #[clap(long)] + pub cluster_size: usize, } #[actix_web::main] @@ -49,5 +58,11 @@ async fn main() -> std::io::Result<()> { // Parse the parameters passed by arguments. let options = Opt::parse(); - start_example_raft_node(options.id, options.http_addr).await + start_example_raft_node( + options.id, + options.http_addr, + options.introducer_addr, + options.introducer_id, + ) + .await }