Some work in actually storing things

This commit is contained in:
Alex Auvolat
2020-04-08 22:00:41 +02:00
parent d50edcdb4f
commit bacc76a057
11 changed files with 302 additions and 110 deletions
+2 -22
View File
@@ -106,7 +106,7 @@ pub struct NetworkConfigEntry {
// Data management
pub const INLINE_THRESHOLD: usize = 2048;
pub const INLINE_THRESHOLD: usize = 3072;
#[derive(Debug, Serialize, Deserialize)]
pub struct SplitpointMeta {
@@ -118,27 +118,7 @@ pub struct SplitpointMeta {
pub deleted: bool,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct VersionMeta {
pub bucket: String,
pub key: String,
pub timestamp: u64,
pub uuid: UUID,
pub mime_type: String,
pub size: u64,
pub is_complete: bool,
pub data: VersionData,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum VersionData {
DeleteMarker,
Inline(#[serde(with="serde_bytes")] Vec<u8>),
FirstBlock(Hash),
}
pub use crate::version_table::*;
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct BlockMeta {