aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-02-15 12:51:52 +0000
committerAlex <alex@adnab.me>2024-02-15 12:51:52 +0000
commit7be3f15e45fcfff10a45302a040c2919a3ba8ccd (patch)
treeeb32dadec4de88e5ec69dbdf5e73f68f9299201a /src/model
parenta2ab275da80159ea2f0606d129790d79d43b4e24 (diff)
parent125c662860621f9c834e254d62b29b5d5ace5dd4 (diff)
downloadgarage-7be3f15e45fcfff10a45302a040c2919a3ba8ccd.tar.gz
garage-7be3f15e45fcfff10a45302a040c2919a3ba8ccd.zip
Merge pull request 'import Netapp code into Garage codebase' (#717) from import-netapp into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/717
Diffstat (limited to 'src/model')
-rw-r--r--src/model/Cargo.toml3
-rw-r--r--src/model/garage.rs2
-rw-r--r--src/model/helper/error.rs6
-rw-r--r--src/model/k2v/rpc.rs2
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()