MCPcopy Create free account
hub / github.com/apache/mesos / readAll

Method readAll

3rdparty/libprocess/src/http.cpp:481–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479
480
481Future<string> Pipe::Reader::readAll()
482{
483 Pipe::Reader reader = *this;
484
485 std::shared_ptr<string> buffer(new string());
486
487 return loop(
488 None(),
489 [=]() mutable {
490 return reader.read();
491 },
492 [=](const string& data) -> ControlFlow<string> {
493 if (data.empty()) { // EOF.
494 return Break(std::move(*buffer));
495 }
496 buffer->append(data);
497 return Continue();
498 });
499}
500
501
502bool Pipe::Reader::close()

Callers 13

convertFunction · 0.80
convertFunction · 0.80
parseFunction · 0.80
consumeMethod · 0.80
TYPED_TESTFunction · 0.80
TESTFunction · 0.80
TEST_PFunction · 0.80
TEST_FFunction · 0.80
getProcessIODataFunction · 0.80
getProcessIODataMethod · 0.80
TESTFunction · 0.80
apiMethod · 0.80

Calls 7

loopFunction · 0.85
NoneClass · 0.85
BreakFunction · 0.50
ContinueClass · 0.50
readMethod · 0.45
emptyMethod · 0.45
appendMethod · 0.45

Tested by 7

TYPED_TESTFunction · 0.64
TESTFunction · 0.64
TEST_PFunction · 0.64
TEST_FFunction · 0.64
getProcessIODataFunction · 0.64
getProcessIODataMethod · 0.64
TESTFunction · 0.64