aboutsummaryrefslogtreecommitdiff
path: root/src/block/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-09-05 14:27:39 +0200
committerAlex Auvolat <alex@adnab.me>2023-09-06 16:35:28 +0200
commit887b3233f45ade24def08b3faa2d6da5fe85a3a1 (patch)
tree90d50a4eb4794aac04eb1f2a5a784aca57b13bae /src/block/block.rs
parent6c420c0880de742b2b6416da1178df828fd977bf (diff)
downloadgarage-887b3233f45ade24def08b3faa2d6da5fe85a3a1.tar.gz
garage-887b3233f45ade24def08b3faa2d6da5fe85a3a1.zip
block manager: use data paths from layout
Diffstat (limited to 'src/block/block.rs')
-rw-r--r--src/block/block.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/block/block.rs b/src/block/block.rs
index 935aa900..6d79fb6c 100644
--- a/src/block/block.rs
+++ b/src/block/block.rs
@@ -1,3 +1,5 @@
+use std::path::PathBuf;
+
use bytes::Bytes;
use serde::{Deserialize, Serialize};
use zstd::stream::{decode_all as zstd_decode, Encoder};
@@ -19,6 +21,13 @@ pub enum DataBlock {
Compressed(Bytes),
}
+pub enum DataBlockPath {
+ /// Uncompressed data fail
+ Plain(PathBuf),
+ /// Compressed data fail
+ Compressed(PathBuf),
+}
+
impl DataBlock {
/// Query whether this block is compressed
pub fn is_compressed(&self) -> bool {