File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
third-party/thrift/src/thrift/lib/cpp2/server Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1919#include < variant>
2020
2121#include < folly/coro/Task.h>
22+ #include < folly/memory/not_null.h>
2223
24+ #include < thrift/lib/cpp2/schema/SyntaxGraph.h>
2325#include < thrift/lib/cpp2/server/ServiceInterceptorStorage.h>
2426#include < thrift/lib/cpp2/server/metrics/InterceptorMetricCallback.h>
2527
@@ -56,7 +58,14 @@ class ServiceInterceptorBase {
5658 */
5759 virtual const ServiceInterceptorQualifiedName& getQualifiedName () const = 0;
5860
59- struct InitParams {};
61+ struct InitParams {
62+ #ifdef THRIFT_SCHEMA_AVAILABLE
63+ using ServiceSchema =
64+ std::vector<folly::not_null<const schema::ServiceNode*>>;
65+ ServiceSchema serviceSchema;
66+ #endif
67+ };
68+
6069 virtual folly::coro::Task<void > co_onStartServing (InitParams);
6170
6271 struct ConnectionInfo {
Original file line number Diff line number Diff line change @@ -1788,6 +1788,11 @@ void ThriftServer::callOnStartServing() {
17881788#if FOLLY_HAS_COROUTINES
17891789 {
17901790 ServiceInterceptorBase::InitParams initParams;
1791+ #ifdef THRIFT_SCHEMA_AVAILABLE
1792+ initParams.serviceSchema =
1793+ decoratedProcessorFactory_->getServiceSchemaNodes ();
1794+ #endif
1795+
17911796 std::vector<folly::coro::Task<void >> tasks;
17921797 for (const auto & interceptor : getServiceInterceptors ()) {
17931798 tasks.emplace_back (interceptor->co_onStartServing (initParams));
You can’t perform that action at this time.
0 commit comments