#include <userver/storages/redis/dynamic_redis.hpp>
Manages dynamically created Redis clients.
Definition at line 55 of file dynamic_redis.hpp.
◆ AddClient()
Adds a new client with the specified name and settings.
- Parameters
-
| name | the name of the client |
| settings | the dynamic settings for the client |
- Returns
- true if the client was added, false if a client with the same name already exists
◆ GetDynamicClient()
Retrieves a dynamically added client by name.
- Parameters
-
| name | the name of the client |
| wait_connected | wait mode for the client connection |
- Returns
- shared pointer to the client throws std::out_of_range exception if there is no client with requested name
◆ ListClients()
| std::unordered_set< std::string > storages::redis::DynamicRedis::ListClients |
( |
| ) |
const |
Lists the names of all dynamically added clients.
- Returns
- a set of client names
◆ RemoveClient()
| bool storages::redis::DynamicRedis::RemoveClient |
( |
const std::string & | name | ) |
|
Removes a client with the specified name.
- Parameters
-
| name | the name of the client to remove |
- Returns
- true if the client was removed, false if no client with the specified name exists
◆ WriteStatistics()
Writes statistics for all dynamic clients.
- Parameters
-
The documentation for this class was generated from the following file: