// Luanti // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2014 celeron55, Perttu Ahola #pragma once #include "config.h" #if USE_REDIS #include #include #include "database.h" class Settings; class Database_Redis : public MapDatabase { public: Database_Redis(Settings &conf); ~Database_Redis(); void beginSave(); void endSave(); bool saveBlock(const v3s16 &pos, std::string_view data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); void listAllLoadableBlocks(std::vector &dst); private: redisContext *ctx = nullptr; std::string hash = ""; }; #endif // USE_REDIS