diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-01-16 17:15:52 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-01-16 17:33:09 +0200 |
commit | 6ed7241df0accea0d06beefa6aa39543b3a138e3 (patch) | |
tree | 1ddb56e4a431421043bd72d38a895f2bd73f23ea /src/client.rs | |
parent | 61ea591bd254a240bb8c45221dea057c1517b0ae (diff) | |
download | obnam2-6ed7241df0accea0d06beefa6aa39543b3a138e3.tar.gz |
refactor: rename AsyncBackupClient to just BackupClient
There is only async.
Sponsored-by: author
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client.rs b/src/client.rs index ed6b86b..e9b00cd 100644 --- a/src/client.rs +++ b/src/client.rs @@ -96,18 +96,16 @@ pub enum ClientError { } /// Client for the Obnam server HTTP API. -/// -/// This is the async version. -pub struct AsyncBackupClient { - chunk_client: AsyncChunkClient, +pub struct BackupClient { + chunk_client: ChunkClient, } -impl AsyncBackupClient { +impl BackupClient { /// Create a new backup client. pub fn new(config: &ClientConfig) -> Result<Self, ClientError> { info!("creating backup client with config: {:#?}", config); Ok(Self { - chunk_client: AsyncChunkClient::new(config)?, + chunk_client: ChunkClient::new(config)?, }) } @@ -162,13 +160,13 @@ impl AsyncBackupClient { } /// Client for using chunk part of Obnam server HTTP API. -pub struct AsyncChunkClient { +pub struct ChunkClient { client: reqwest::Client, base_url: String, cipher: CipherEngine, } -impl AsyncChunkClient { +impl ChunkClient { /// Create a new chunk client. pub fn new(config: &ClientConfig) -> Result<Self, ClientError> { let pass = config.passwords()?; |