summaryrefslogtreecommitdiffstats
path: root/src/filestore
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-12-08 13:23:46 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-12-08 13:29:26 +0100
commit4df090b2bd3887c384af55a05be2c4b8d25ffb6c (patch)
tree6fc5f32fc122b6f5f6a3e593383b01bd80fa993b /src/filestore
parent4be403e9eb7fdcb37a6083757c0c460e1d33cf82 (diff)
Make StagingStore get()able from MergedStores, to simplify Orchestrator impl
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore')
-rw-r--r--src/filestore/merged.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/filestore/merged.rs b/src/filestore/merged.rs
index 396a85c..8172516 100644
--- a/src/filestore/merged.rs
+++ b/src/filestore/merged.rs
@@ -4,6 +4,7 @@ use log::trace;
use tokio::sync::RwLock;
use anyhow::Result;
+use getset::Getters;
use crate::filestore::Artifact;
use crate::filestore::ReleaseStore;
@@ -16,8 +17,11 @@ use crate::package::PackageVersionConstraint;
/// The stores are not actually merged (on disk or in memory), but the querying mechanism works in
/// a way where it _always_ preferes the staging store over the release store.
///
+#[derive(Getters)]
pub struct MergedStores {
release: Arc<RwLock<ReleaseStore>>,
+
+ #[getset(get = "pub")]
staging: Arc<RwLock<StagingStore>>,
}