userver: userver/storages/redis/utest/redis_local.hpp Source File
Loading...
Searching...
No Matches
redis_local.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/redis/utest/redis_local.hpp
4/// @brief @copybrief storages::redis::RedisLocal
5
6#include <userver/storages/redis/client.hpp>
7#include <userver/storages/redis/subscribe_client.hpp>
8
9USERVER_NAMESPACE_BEGIN
10
11namespace storages::redis::utest {
12
13namespace impl {
14class RedisLocalImpl;
15} // namespace impl
16
17/// @brief Redis local class
18///
19/// Provide access to localhost Redis
21public:
22 RedisLocal();
23 ~RedisLocal();
24
25 /// Get client
26 ClientPtr GetClient() const;
27
28 /// Get subscribe client
29 SubscribeClientPtr GetSubscribeClient() const;
30
31 /// call `flushdb` command
32 void FlushDb();
33
34private:
35 std::unique_ptr<impl::RedisLocalImpl> impl_;
36};
37
38} // namespace storages::redis::utest
39
40USERVER_NAMESPACE_END