aboutsummaryrefslogtreecommitdiff
path: root/src/data.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-06 22:27:51 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-06 22:27:51 +0200
commit87f2b4d2fc8835f8adda69adb6b51fd73ffb20a5 (patch)
treeb28f8e2c585489f51fc083d343179e25d8f8c76a /src/data.rs
parent3c36b449a3786bb62fa023bde37bac24635b5717 (diff)
downloadgarage-87f2b4d2fc8835f8adda69adb6b51fd73ffb20a5.tar.gz
garage-87f2b4d2fc8835f8adda69adb6b51fd73ffb20a5.zip
Ununderstandable error
Diffstat (limited to 'src/data.rs')
-rw-r--r--src/data.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/data.rs b/src/data.rs
index e26a38f0..68f81240 100644
--- a/src/data.rs
+++ b/src/data.rs
@@ -1,9 +1,23 @@
+use std::collections::HashMap;
use serde::{Serialize, Deserialize};
pub type UUID = [u8; 32];
pub type Hash = [u8; 32];
+// Network management
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct NetworkConfig {
+ pub members: HashMap<UUID, NetworkConfigEntry>,
+ pub version: u64,
+}
+
+#[derive(Clone, Debug, Serialize, Deserialize)]
+pub struct NetworkConfigEntry {
+ pub n_tokens: u32,
+}
+
// Data management
#[derive(Debug, Serialize, Deserialize)]