blob: e675848a567fb2fe84b7839d162996dc3eaa7538 (
plain)
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
|
#pragma once
#include "erebos/storage.h"
#include <future>
namespace fs = std::filesystem;
using std::optional;
using std::shared_future;
using std::vector;
namespace erebos {
struct Storage::Priv
{
static constexpr size_t CHUNK = 16384;
fs::path root;
fs::path objectPath(const Digest &) const;
fs::path keyPath(const Digest &) const;
optional<vector<uint8_t>> loadBytes(const Digest &) const;
void storeBytes(const Digest &, const vector<uint8_t> &) const;
};
struct Ref::Priv
{
Storage storage;
Digest digest;
shared_future<Object> object;
};
}
|