aboutsummaryrefslogtreecommitdiff
path: root/src/proto.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-08 00:39:07 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-08 00:39:07 +0200
commitd50edcdb4f8b8ec00b1f0ffb6a3ebbb0e5afdc1f (patch)
treeb283abf578b3c80c2885eb0e220f7f3a02ba994d /src/proto.rs
parent90cdffb425c6222f4234db54a16c079d8c058724 (diff)
downloadgarage-d50edcdb4f8b8ec00b1f0ffb6a3ebbb0e5afdc1f.tar.gz
garage-d50edcdb4f8b8ec00b1f0ffb6a3ebbb0e5afdc1f.zip
Basic workflow for client PUT, next is do actual storage
Diffstat (limited to 'src/proto.rs')
-rw-r--r--src/proto.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/proto.rs b/src/proto.rs
index d1d4fb59..04b8e2b2 100644
--- a/src/proto.rs
+++ b/src/proto.rs
@@ -16,6 +16,9 @@ pub enum Message {
PullConfig,
AdvertiseNodesUp(Vec<AdvertisedNode>),
AdvertiseConfig(NetworkConfig),
+
+ PutBlock(PutBlockMessage),
+ AdvertiseVersion(VersionMeta),
}
#[derive(Debug, Serialize, Deserialize)]
@@ -32,3 +35,11 @@ pub struct AdvertisedNode {
pub id: UUID,
pub addr: SocketAddr,
}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PutBlockMessage {
+ pub meta: BlockMeta,
+
+ #[serde(with="serde_bytes")]
+ pub data: Vec<u8>,
+}