diff options
author | Alex Auvolat <alex@adnab.me> | 2023-11-15 14:20:50 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-11-15 14:20:50 +0100 |
commit | 393c4d4515e0cdadadc8de8ae2df12e4371cff88 (patch) | |
tree | 1805db8a9697a723abd76f26f2cd421d9f5960a5 /src/rpc/rpc_helper.rs | |
parent | 65066c70640371cc318faddfb4c05c96de18e86d (diff) | |
download | garage-393c4d4515e0cdadadc8de8ae2df12e4371cff88.tar.gz garage-393c4d4515e0cdadadc8de8ae2df12e4371cff88.zip |
layout: add helper for cached/external values to centralize recomputation
Diffstat (limited to 'src/rpc/rpc_helper.rs')
-rw-r--r-- | src/rpc/rpc_helper.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/rpc_helper.rs b/src/rpc/rpc_helper.rs index 1bad495b..e269ddaa 100644 --- a/src/rpc/rpc_helper.rs +++ b/src/rpc/rpc_helper.rs @@ -26,7 +26,7 @@ use garage_util::data::*; use garage_util::error::Error; use garage_util::metrics::RecordDuration; -use crate::layout::LayoutHistory; +use crate::layout::LayoutHelper; use crate::metrics::RpcMetrics; // Default RPC timeout = 5 minutes @@ -90,7 +90,7 @@ pub struct RpcHelper(Arc<RpcHelperInner>); struct RpcHelperInner { our_node_id: Uuid, fullmesh: Arc<FullMeshPeeringStrategy>, - layout: Arc<RwLock<LayoutHistory>>, + layout: Arc<RwLock<LayoutHelper>>, metrics: RpcMetrics, rpc_timeout: Duration, } @@ -99,7 +99,7 @@ impl RpcHelper { pub(crate) fn new( our_node_id: Uuid, fullmesh: Arc<FullMeshPeeringStrategy>, - layout: Arc<RwLock<LayoutHistory>>, + layout: Arc<RwLock<LayoutHelper>>, rpc_timeout: Option<Duration>, ) -> Self { let metrics = RpcMetrics::new(); |