10void GetRedisKey(
const std::string& key, size_t* key_start, size_t* key_len);
14 virtual ~KeyShard() =
default;
15 virtual size_t ShardByKey(
const std::string& key)
const = 0;
16 virtual bool IsGenerateKeysForShardsEnabled()
const = 0;
23 KeyShardFactory(
const std::string& type) : type_(type) {}
24 std::unique_ptr<redis::KeyShard> operator()(size_t nshards);