aboutsummaryrefslogtreecommitdiff
path: root/src/version_table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-08 23:01:49 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-08 23:01:49 +0200
commitcc580da0aef95bcb94bd2ce602258d0d18388969 (patch)
treec61148b75627dc27989d4ce39ded3b6124c86cfb /src/version_table.rs
parentbacc76a057bcd90d61bfe3584bd3cdbadc748364 (diff)
downloadgarage-cc580da0aef95bcb94bd2ce602258d0d18388969.tar.gz
garage-cc580da0aef95bcb94bd2ce602258d0d18388969.zip
Some work
Diffstat (limited to 'src/version_table.rs')
-rw-r--r--src/version_table.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/version_table.rs b/src/version_table.rs
index d857ac12..86086421 100644
--- a/src/version_table.rs
+++ b/src/version_table.rs
@@ -1,13 +1,14 @@
use std::sync::Arc;
use serde::{Serialize, Deserialize};
use async_trait::async_trait;
+use tokio::sync::RwLock;
use crate::data::*;
use crate::table::*;
-use crate::membership::System;
+use crate::server::Garage;
-#[derive(Clone, Debug, Serialize, Deserialize)]
+#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct VersionMetaKey {
pub bucket: String,
pub key: String,
@@ -33,7 +34,7 @@ pub enum VersionData {
}
pub struct VersionTable {
- system: Arc<System>,
+ pub garage: RwLock<Option<Arc<Garage>>>,
}
impl KeyHash for VersionMetaKey {