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

Method BuildRedisRequest

src/brpc/redis_cluster.cpp:1064–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064bool RedisClusterChannel::BuildRedisRequest(const std::vector<std::string>& args,
1065 RedisRequest* request) {
1066 request->Clear();
1067 if (args.empty()) {
1068 return false;
1069 }
1070 std::vector<butil::StringPiece> components;
1071 components.reserve(args.size());
1072 for (size_t i = 0; i < args.size(); ++i) {
1073 components.push_back(args[i]);
1074 }
1075 return request->AddCommandByComponents(&components[0], components.size());
1076}
1077
1078void RedisClusterChannel::AppendIntegerReply(butil::IOBuf* buf, int64_t value) {
1079 std::ostringstream oss;

Callers

nothing calls this directly

Calls 6

ClearMethod · 0.45
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected