diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-13 12:55:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-15 12:15:07 +0100 |
commit | 5ea24254a91c3794ceb69e68c940b13f5447f40c (patch) | |
tree | dc30460edeb757699fc7057a7fed640c69dfb79d /src/model | |
parent | a2ab275da80159ea2f0606d129790d79d43b4e24 (diff) | |
download | garage-5ea24254a91c3794ceb69e68c940b13f5447f40c.tar.gz garage-5ea24254a91c3794ceb69e68c940b13f5447f40c.zip |
[import-netapp] import Netapp code into Garage codebase
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/Cargo.toml | 3 | ||||
-rw-r--r-- | src/model/garage.rs | 2 | ||||
-rw-r--r-- | src/model/helper/error.rs | 6 | ||||
-rw-r--r-- | src/model/k2v/rpc.rs | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index d4a1a711..ce0ccff0 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -19,6 +19,7 @@ garage_rpc.workspace = true garage_table.workspace = true garage_block.workspace = true garage_util.workspace = true +garage_net.workspace = true async-trait.workspace = true arc-swap.workspace = true @@ -39,8 +40,6 @@ futures-util.workspace = true tokio.workspace = true opentelemetry.workspace = true -netapp.workspace = true - [features] default = [ "sled", "lmdb", "sqlite" ] k2v = [ "garage_util/k2v" ] diff --git a/src/model/garage.rs b/src/model/garage.rs index 8c9a3af3..c10d64c5 100644 --- a/src/model/garage.rs +++ b/src/model/garage.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use netapp::NetworkKey; +use garage_net::NetworkKey; use garage_db as db; diff --git a/src/model/helper/error.rs b/src/model/helper/error.rs index 3ca8f55c..e2ffdd68 100644 --- a/src/model/helper/error.rs +++ b/src/model/helper/error.rs @@ -22,9 +22,9 @@ pub enum Error { NoSuchBucket(String), } -impl From<netapp::error::Error> for Error { - fn from(e: netapp::error::Error) -> Self { - Error::Internal(GarageError::Netapp(e)) +impl From<garage_net::error::Error> for Error { + fn from(e: garage_net::error::Error) -> Self { + Error::Internal(GarageError::Net(e)) } } diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs index 37e142f6..4ab44c22 100644 --- a/src/model/k2v/rpc.rs +++ b/src/model/k2v/rpc.rs @@ -296,7 +296,7 @@ impl K2VRpcHandler { }; // Send the request to all nodes, use FuturesUnordered to get the responses in any order - let msg = msg.into_req().map_err(netapp::error::Error::from)?; + let msg = msg.into_req().map_err(garage_net::error::Error::from)?; let rs = RequestStrategy::with_priority(PRIO_NORMAL).without_timeout(); let mut requests = nodes .iter() |