jamesge commented on a change in pull request #972: Redis server protocol
URL: https://github.com/apache/incubator-brpc/pull/972#discussion_r356952885
 
 

 ##########
 File path: src/brpc/redis.h
 ##########
 @@ -209,7 +213,54 @@ class RedisResponse : public ::google::protobuf::Message {
 std::ostream& operator<<(std::ostream& os, const RedisRequest&);
 std::ostream& operator<<(std::ostream& os, const RedisResponse&);
 
-} // namespace brpc
+class RedisCommandHandler;
+
+// Implement this class and assign an instance to ServerOption.redis_service
+// to enable redis support. 
+class RedisService {
+public:
+    typedef std::unordered_map<std::string, 
std::shared_ptr<RedisCommandHandler>> CommandMap;
 
 Review comment:
   内部用shared_ptr但仍有函数返回裸指针,多半是有问题的。这里需要shared_ptr么?和service一致即可。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to