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

Method Register

test/brpc_naming_service_unittest.cpp:591–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589 }
590
591 void Register(google::protobuf::RpcController* cntl_base,
592 const test::HttpRequest*,
593 test::HttpResponse*,
594 google::protobuf::Closure* done) {
595 brpc::ClosureGuard done_guard(done);
596 brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
597 auto body = cntl->request_attachment().to_string();
598 for (brpc::QuerySplitter sp(body); sp; ++sp) {
599 if (sp.key() == "addrs") {
600 _addrs.insert(sp.value().as_string());
601 }
602 }
603 cntl->response_attachment().append(R"({
604 "code": 0,
605 "message": "0"
606 })");
607 return;
608 }
609
610 void Renew(google::protobuf::RpcController* cntl_base,
611 const test::HttpRequest*,

Callers 2

TEST_FFunction · 0.45
TESTFunction · 0.45

Calls 6

to_stringMethod · 0.45
keyMethod · 0.45
insertMethod · 0.45
as_stringMethod · 0.45
valueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected