diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-16 14:50:49 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-16 14:50:49 +0200 |
commit | f01c1e71b5421d8941d1484e224cd6fd75525651 (patch) | |
tree | ce076bbd0a5c63506bece06184942712b79f2ee5 /src/main.rs | |
parent | 43ce5e4ab4ebe317bb9263de5d56b90dc68ea7eb (diff) | |
download | garage-f01c1e71b5421d8941d1484e224cd6fd75525651.tar.gz garage-f01c1e71b5421d8941d1484e224cd6fd75525651.zip |
Begin work on sync...
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs index ea6124b5..8b124bff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ mod proto; mod background; mod membership; mod table; +mod table_sync; mod block; mod block_ref_table; @@ -36,11 +37,11 @@ pub struct Opt { #[structopt(short = "h", long = "rpc-host", default_value = "127.0.0.1:3901")] rpc_host: SocketAddr, - #[structopt(long="ca-cert")] + #[structopt(long = "ca-cert")] ca_cert: Option<String>, - #[structopt(long="client-cert")] + #[structopt(long = "client-cert")] client_cert: Option<String>, - #[structopt(long="client-key")] + #[structopt(long = "client-key")] client_key: Option<String>, #[structopt(subcommand)] @@ -86,13 +87,11 @@ async fn main() { let opt = Opt::from_args(); let tls_config = match (opt.ca_cert, opt.client_cert, opt.client_key) { - (Some(ca_cert), Some(client_cert), Some(client_key)) => { - Some(TlsConfig{ - ca_cert, - node_cert: client_cert, - node_key: client_key, - }) - } + (Some(ca_cert), Some(client_cert), Some(client_key)) => Some(TlsConfig { + ca_cert, + node_cert: client_cert, + node_key: client_key, + }), (None, None, None) => None, _ => { eprintln!("Missing one of: --ca-cert, --node-cert, --node-key. Not using TLS."); |