diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-08 00:39:07 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-08 00:39:07 +0200 |
commit | d50edcdb4f8b8ec00b1f0ffb6a3ebbb0e5afdc1f (patch) | |
tree | b283abf578b3c80c2885eb0e220f7f3a02ba994d /src/proto.rs | |
parent | 90cdffb425c6222f4234db54a16c079d8c058724 (diff) | |
download | garage-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.rs | 11 |
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>, +} |