MCPcopy Create free account
hub / github.com/Tencent/phxqueue / Dispatch

Function Dispatch

phxqueue_phxrpc/app/lock/lock_main.cpp:79–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79void Dispatch(const phxrpc::HttpRequest &req,
80 phxrpc::HttpResponse *const resp,
81 phxrpc::DispatcherArgs_t *const args) {
82 ServiceArgs_t *service_args{(ServiceArgs_t *)(args->service_args)};
83
84 LockServiceImpl service(*service_args);
85 LockDispatcher dispatcher(service, args);
86
87 phxrpc::HttpDispatcher<LockDispatcher> base_dispatcher(
88 dispatcher, LockDispatcher::GetURIFuncMap());
89 if (!base_dispatcher.Dispatch(req, resp)) {
90 resp->SetStatusCode(404);
91 resp->SetReasonPhrase("Not Found");
92 }
93}
94
95void ShowUsage(const char *program) {
96 printf("\n");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected