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

Method AddCommandWithArgs

src/brpc/redis.cpp:123–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123bool RedisRequest::AddCommandWithArgs(const char* fmt, ...) {
124 if (_has_error) {
125 return false;
126 }
127 va_list ap;
128 va_start(ap, fmt);
129 const butil::Status st = RedisCommandFormatV(&_buf, fmt, ap);
130 va_end(ap);
131 if (st.ok()) {
132 ++_ncommand;
133 return true;
134 } else {
135 CHECK(st.ok()) << st;
136 _has_error = true;
137 return false;
138 }
139}
140
141bool RedisRequest::AddCommandV(const char* fmt, va_list ap) {
142 if (_has_error) {

Callers

nothing calls this directly

Calls 2

RedisCommandFormatVFunction · 0.85
okMethod · 0.80

Tested by

no test coverage detected