blob: b195b930c1b104d9649e8098a4853303b5fb7e88 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#[shared_macros::constants]
mod consts {
/// Full object storage pool directory
pub const DIR_BUCKET_OBJ: &str = "./objects/";
/// Full compressed object storage pool directory
pub const DIR_BUCKET_COMPRESSED_OBJ: &str = "./compressed-objects/";
/// Incremental object fragment storage pool directory
pub const DIR_BUCKET_DELTA: &str = "./delta-objects/";
/// Version information storage directory
pub const DIR_BUCKET_ID_REVS: &str = "./revs/";
/// Tag storage directory, used to record tags for easy file location
pub const DIR_BUCKET_ID_TAGS: &str = "./tags/";
/// ID mapping table, used to map local IDs to remote IDs (client-only)
pub const DIR_BUCKET_IDMAP: &str = "./map/";
/// Full object file path template
pub const FILE_BUCKET_OBJ: &str = "./objects/{slice1}/{slice2}/{fullname}";
/// Full compressed object file path template
pub const FILE_BUCKET_COMPRESSED_OBJ: &str =
"./compressed-objects/{slice1}/{slice2}/{fullname}";
/// Incremental object file path template (records change info between the previous delta and the current delta)
pub const FILE_BUCKET_DELTA: &str = "./delta-objects/{slice1}/{slice2}/{fullname}";
/// Version information file, records the storage mode, pointed object, and its log offset for all versions of a given file ID (append-only)
pub const FILE_BUCKET_ID_REV: &str = "./revs/{file_id}.v";
/// Version log file, records all operation logs for a given file ID (append-only)
pub const FILE_BUCKET_ID_REV_LOG: &str = "./revs/{file_id}.log";
/// Tag file, internally points to a file_id
pub const FILE_BUCKET_ID_TAG: &str = "./tags/{tag_name}";
/// ID mapping chunk, used to map local IDs to remote IDs (client-only)
/// 26635 bytes per chunk
pub const FILE_BUCKET_IDMAP: &str = "./map/{chunk_num}";
/// Remote BUCKET binding (client-only)
pub const FILE_BUCKET_BIND: &str = "./BIND_{bind_id}";
/// Prefix of remote BUCKET binding file (client-only)
pub const PREFIX_BUCKET_BIND: &str = "BIND_";
}
pub use consts::*;
|