mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-15 16:14:12 +00:00
Start putting Redis stuff in a wrapper class.
Nonworking, but the project builds.
This commit is contained in:
parent
db23dcea3f
commit
f7a7015c65
5 changed files with 188 additions and 74 deletions
|
@ -19,12 +19,10 @@
|
|||
#define idB2F92EE07A004D5293FD0657EEE8F75B
|
||||
|
||||
#include "backends/db_backend.hpp"
|
||||
#include <memory>
|
||||
#include "command.hpp"
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
|
||||
struct redisContext;
|
||||
|
||||
namespace dindb {
|
||||
class BackendRedis : public Backend {
|
||||
public:
|
||||
|
@ -58,13 +56,7 @@ namespace dindb {
|
|||
virtual std::vector<std::string> find_paths_starting_by ( GroupIDType parGroupID, uint16_t parLevel, boost::string_ref parPath ) override;
|
||||
|
||||
private:
|
||||
using RedisConnection = std::unique_ptr<redisContext, void(*)(redisContext*)>;
|
||||
|
||||
bool is_connected ( void ) const;
|
||||
|
||||
RedisConnection m_conn;
|
||||
std::string m_address;
|
||||
uint16_t m_port;
|
||||
redis::Command m_redis;
|
||||
};
|
||||
} //namespace dindb
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue