| 171 | } |
| 172 | |
| 173 | static bool ParseEndpoint(const std::string& endpoint, std::string* host, int* port) { |
| 174 | size_t pos = endpoint.rfind(':'); |
| 175 | if (pos == std::string::npos) { |
| 176 | return false; |
| 177 | } |
| 178 | *host = endpoint.substr(0, pos); |
| 179 | *port = atoi(endpoint.substr(pos + 1).c_str()); |
| 180 | return (*port > 0); |
| 181 | } |
| 182 | |
| 183 | class AskingHandler : public brpc::RedisCommandHandler { |
| 184 | public: |
no test coverage detected