diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-11-18 08:47:37 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-11-18 08:47:37 +0200 |
commit | b5ddc105852b63651916f322ce855baf61d129d0 (patch) | |
tree | d6e6ee6ca6f0ecfbba1311879e87e77a720a49c9 /src/cmd/restore.rs | |
parent | 24ffcb0083750bb77963a1ab8e3205290c2c7190 (diff) | |
download | obnam2-b5ddc105852b63651916f322ce855baf61d129d0.tar.gz |
feat! change client config to take a base URL instead of host, port
Diffstat (limited to 'src/cmd/restore.rs')
-rw-r--r-- | src/cmd/restore.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/restore.rs b/src/cmd/restore.rs index 6e2690c..8aa0345 100644 --- a/src/cmd/restore.rs +++ b/src/cmd/restore.rs @@ -12,7 +12,7 @@ use structopt::StructOpt; pub fn restore(config: &Path, gen_id: &str, dbname: &Path, to: &Path) -> anyhow::Result<()> { let config = Config::read_config(&config).unwrap(); - let client = BackupClient::new(&config.server_name, config.server_port)?; + let client = BackupClient::new(&config.server_url)?; let gen_chunk = client.fetch_generation(&gen_id)?; debug!("gen: {:?}", gen_chunk); { @@ -50,8 +50,7 @@ struct Opt { #[derive(Debug, Deserialize, Clone)] pub struct Config { - pub server_name: String, - pub server_port: u16, + pub server_url: String, } impl Config { |