| 83 | } |
| 84 | |
| 85 | __attribute__((visibility("hidden"))) bl::result<std::nullptr_t> Query( |
| 86 | void* worker_handler, const gs::rpc::QueryArgs& query_args, |
| 87 | const std::string& context_key, |
| 88 | std::shared_ptr<gs::IFragmentWrapper> frag_wrapper, |
| 89 | std::shared_ptr<gs::IContextWrapper>& ctx_wrapper) { |
| 90 | auto worker = static_cast<worker_handler_t*>(worker_handler)->worker; |
| 91 | auto result = gs::FlashAppInvoker<_APP_TYPE>::Query(worker, query_args); |
| 92 | if (result) { |
| 93 | if (!context_key.empty()) { |
| 94 | auto ctx = worker->GetContext(); |
| 95 | ctx_wrapper = gs::CtxWrapperBuilder<typename _APP_TYPE::context_t>::build( |
| 96 | context_key, frag_wrapper, ctx); |
| 97 | } |
| 98 | } |
| 99 | return result; |
| 100 | } |
| 101 | } // namespace detail |
| 102 | extern "C" { |
| 103 | void* CreateWorker(const std::shared_ptr<void>& fragment, |
nothing calls this directly
no test coverage detected