MCPcopy Create free account
hub / github.com/apache/brpc / FillSlotEntry

Method FillSlotEntry

test/brpc_redis_cluster_unittest.cpp:291–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290private:
291 static void FillSlotEntry(brpc::RedisReply& reply, int start, int end,
292 const std::string& endpoint,
293 bool empty_host) {
294 std::string host;
295 int port = 0;
296 ParseEndpoint(endpoint, &host, &port);
297 reply.SetArray(3);
298 reply[0].SetInteger(start);
299 reply[1].SetInteger(end);
300 reply[2].SetArray(2);
301 if (empty_host) {
302 reply[2][0].SetString("");
303 } else {
304 reply[2][0].SetString(host);
305 }
306 reply[2][1].SetInteger(port);
307 }
308
309private:
310 ClusterMeta* _meta;

Callers

nothing calls this directly

Calls 4

ParseEndpointFunction · 0.85
SetArrayMethod · 0.80
SetIntegerMethod · 0.80
SetStringMethod · 0.45

Tested by

no test coverage detected