This commit is contained in:
Your Name
2025-04-30 22:11:22 +12:00
parent 9c0ade961f
commit ed5a9d99a3
3 changed files with 5070 additions and 45 deletions

View File

@@ -3,11 +3,12 @@
#include "config.hpp"
#include "httplib.hpp"
#include "litecask.hpp"
#include <string>
#include <unordered_map>
#include <memory>
#include <thread>
#include <atomic>
#include <filesystem>
namespace dropshell {
@@ -20,12 +21,6 @@ public:
void stop();
private:
struct ObjectInfo {
std::string label;
std::string tag;
uint64_t hash;
};
void setup_routes();
void handle_get_object(const httplib::Request& req, httplib::Response& res);
void handle_get_hash(const httplib::Request& req, httplib::Response& res);
@@ -36,8 +31,9 @@ private:
const ServerConfig& config_;
httplib::Server server_;
litecask::Datastore datastore_;
std::filesystem::path datastore_path_;
std::atomic<bool> running_;
std::unordered_map<std::string, uint64_t> label_tag_index_;
};
} // namespace dropshell