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

Method Consume

src/brpc/redis_command.cpp:377–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377ParseError RedisCommandParser::Consume(butil::IOBuf& buf,
378 std::vector<butil::StringPiece>* args,
379 butil::Arena* arena) {
380 ParseError err = PARSE_OK;
381 do {
382 RedisCommandConsumeState state = ConsumeImpl(buf, arena, &err);
383 if (state == CONSUME_STATE_CONTINUE) {
384 continue;
385 } else if (state == CONSUME_STATE_DONE) {
386 break;
387 } else {
388 return err;
389 }
390 } while (true);
391
392 args->swap(_args);
393 Reset();
394 return PARSE_OK;
395}
396
397RedisCommandConsumeState RedisCommandParser::ConsumeImpl(butil::IOBuf& buf,
398 butil::Arena* arena,

Callers

nothing calls this directly

Calls 1

swapMethod · 0.45

Tested by

no test coverage detected