MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / Process

Method Process

src/apiserver/api_server_impl.cc:54–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void APIServerImpl::Process(google::protobuf::RpcController* cntl_base, const HttpRequest*, HttpResponse*,
55 google::protobuf::Closure* done) {
56 brpc::ClosureGuard done_guard(done);
57 auto* cntl = dynamic_cast<brpc::Controller*>(cntl_base);
58
59 // The unresolved path has no slashes at the beginning(guaranteed by brpc), it's not good for url parsing
60 auto unresolved_path = "/" + cntl->http_request().unresolved_path();
61 auto method = cntl->http_request().method();
62 DLOG(INFO) << "unresolved path: " << unresolved_path << ", method: " << HttpMethod2Str(method);
63 const butil::IOBuf& req_body = cntl->request_attachment();
64
65 JsonWriter writer;
66 provider_.handle(unresolved_path, method, req_body, writer);
67
68 cntl->response_attachment().append(writer.GetString());
69}
70
71bool APIServerImpl::Json2SQLRequestRow(const butil::rapidjson::Value& non_common_cols_v,
72 const butil::rapidjson::Value& common_cols_v,

Callers

nothing calls this directly

Calls 3

handleMethod · 0.80
appendMethod · 0.80
GetStringMethod · 0.45

Tested by

no test coverage detected