aboutsummaryrefslogtreecommitdiffstats
path: root/include/InMemoryBackend.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/InMemoryBackend.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/include/InMemoryBackend.h b/include/InMemoryBackend.h
deleted file mode 100644
index b66d355..0000000
--- a/include/InMemoryBackend.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#pragma once
-
-#include "Api.h"
-#include "IStorageBackend.h"
-
-#include <cstdint>
-#include <optional>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-/**
- * @file InMemoryBackend.h
- * @brief In-process KV storage backend backed by an unordered_map.
- *
- * Intended for unit tests where SQLite is not appropriate. Data does not
- * survive process exit and is not thread-safe.
- *
- * Relation membership is tracked by the Merkle class, not this backend.
- */
-
-namespace nt {
- class InMemoryBackend : public IStorageBackend {
- public:
- std::string Put(std::vector<uint8_t> value) override;
- std::optional<std::vector<uint8_t>> Get(const std::string& hash) override;
-
- private:
- std::unordered_map<std::string, std::vector<uint8_t>> kv_;
- };
-} // namespace nt