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

Method default_method

src/brpc/builtin/list_service.cpp:29–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27namespace brpc {
28
29void ListService::default_method(::google::protobuf::RpcController*,
30 const ::brpc::ListRequest*,
31 ::brpc::ListResponse* response,
32 ::google::protobuf::Closure* done) {
33 ClosureGuard done_guard(done);
34 std::vector<google::protobuf::Service*> services;
35 _server->ListServices(&services);
36 for (size_t i = 0; i < services.size(); ++i) {
37 google::protobuf::ServiceDescriptorProto *svc = response->add_service();
38 services[i]->GetDescriptor()->CopyTo(svc);
39 }
40}
41
42} // namespace brpc

Callers

nothing calls this directly

Calls 3

ListServicesMethod · 0.80
sizeMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected