aboutsummaryrefslogtreecommitdiff
path: root/src/proto.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-18 19:30:05 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-18 19:30:05 +0200
commitbd1618e78e4c4305a73bdd40004de2abe46c3ceb (patch)
tree8d84b73808a3a968941a59672aae398a61f8d5ff /src/proto.rs
parentf41583e1b731574b4bb13a20d4b3fd9fe3a899f5 (diff)
downloadgarage-bd1618e78e4c4305a73bdd40004de2abe46c3ceb.tar.gz
garage-bd1618e78e4c4305a73bdd40004de2abe46c3ceb.zip
Remove proto.rs & move some definitions out of data.rs
Diffstat (limited to 'src/proto.rs')
-rw-r--r--src/proto.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/proto.rs b/src/proto.rs
deleted file mode 100644
index d51aa36b..00000000
--- a/src/proto.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use serde::{Deserialize, Serialize};
-use std::net::SocketAddr;
-use std::time::Duration;
-
-use crate::data::*;
-
-pub const DEFAULT_TIMEOUT: Duration = Duration::from_secs(10);
-pub const BLOCK_RW_TIMEOUT: Duration = Duration::from_secs(42);
-
-#[derive(Debug, Serialize, Deserialize)]
-pub struct PingMessage {
- pub id: UUID,
- pub rpc_port: u16,
-
- pub status_hash: Hash,
- pub config_version: u64,
-}
-
-#[derive(Clone, Debug, Serialize, Deserialize)]
-pub struct AdvertisedNode {
- pub id: UUID,
- pub addr: SocketAddr,
-}
-
-#[derive(Debug, Serialize, Deserialize)]
-pub struct PutBlockMessage {
- pub hash: Hash,
-
- #[serde(with = "serde_bytes")]
- pub data: Vec<u8>,
-}