userver: userver/storages/redis/sharding_strategies.hpp Source File
Loading...
Searching...
No Matches
sharding_strategies.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/storages/redis/sharding_strategies.hpp
4/// @brief @copybrief storages::redis::ShardingStrategy
5
6#include <string_view>
7
8USERVER_NAMESPACE_BEGIN
9
10namespace storages::redis {
11
12/// @brief How Redis keys are mapped to shards or cluster topology
13enum class ShardingStrategy {
14 kRedisCluster,
15 kRedisStandalone,
16 kKeyShardCrc32,
17 kKeyShardTaximeterCrc32,
18 kKeyShardGpsStorageDriver
19};
20
21ShardingStrategy ToShardingStrategy(std::string_view view);
22std::string_view ToStringView(ShardingStrategy);
23
24} // namespace storages::redis
25
26USERVER_NAMESPACE_END