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

Function Dispatch

phxqueue_phxrpc/app/scheduler/scheduler_main.cpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71void Dispatch(const phxrpc::HttpRequest &req,
72 phxrpc::HttpResponse *const resp,
73 phxrpc::DispatcherArgs_t *const args) {
74 ServiceArgs_t *service_args = (ServiceArgs_t *)(args->service_args);
75
76 SchedulerServiceImpl service(*service_args);
77 SchedulerDispatcher dispatcher(service, args);
78
79 phxrpc::HttpDispatcher<SchedulerDispatcher> base_dispatcher(
80 dispatcher, SchedulerDispatcher::GetURIFuncMap());
81 if (!base_dispatcher.Dispatch(req, resp)) {
82 resp->SetStatusCode(404);
83 resp->SetReasonPhrase("Not Found");
84 }
85}
86
87void ShowUsage(const char *program) {
88 printf("\n");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected