userver: userver/storages/redis/impl/redis_state.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
redis_state.hpp
1#pragma once
2
3USERVER_NAMESPACE_BEGIN
4
5namespace redis {
6
7/// Represents the state of redis instance connection
8enum class RedisState {
9 /// Initializing context and establishing connection
10 kInit = 0,
11
12 /// Connection initialization failed
13 kInitError,
14
15 /// Connection established and ready to send commands
16 kConnected,
17
18 /// Closing connection, all remaining commands are dropped
19 kDisconnecting,
20
21 /// Connection successfully closed
22 kDisconnected,
23
24 /// An error occurred while closing connection
25 kDisconnectError
26};
27
28} // namespace redis
29
30USERVER_NAMESPACE_END