@@ -259,6 +259,15 @@ struct TRpcServices {
259259 struct TEvForgetOperation : public TEventLocal <TEvForgetOperation, TRpcServices::EvForgetOperation> {};
260260};
261261
262+ namespace NRuntimeEvents {
263+
264+ enum class EType {
265+ COMMON,
266+ BOOTSTRAP_CLUSTER,
267+ };
268+
269+ } // NRuntimeEvents
270+
262271// Should be specialized for real responses
263272template <class T >
264273void FillYdbStatus (T& resp, const NYql::TIssues& issues, Ydb::StatusIds::StatusCode status);
@@ -1118,6 +1127,18 @@ class TEvProxyRuntimeEvent
11181127 const TMaybe<TString> GetGrpcUserAgent () const {
11191128 return GetPeerMetaValues (NYdbGrpc::GRPC_USER_AGENT_HEADER);
11201129 }
1130+
1131+ virtual NRuntimeEvents::EType GetRuntimeEventType () {
1132+ return NRuntimeEvents::EType::COMMON;
1133+ }
1134+ };
1135+
1136+ template <NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON>
1137+ class TEvProxyRuntimeEventWithType : public TEvProxyRuntimeEvent {
1138+ public:
1139+ NRuntimeEvents::EType GetRuntimeEventType () override {
1140+ return RuntimeEventType;
1141+ }
11211142};
11221143
11231144template <ui32 TRpcId, typename TDerived>
@@ -1135,13 +1156,13 @@ class TEvProxyLegacyEvent
11351156 }
11361157};
11371158
1138- template <ui32 TRpcId, typename TReq, typename TResp, bool IsOperation, typename TDerived, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
1159+ template <ui32 TRpcId, typename TReq, typename TResp, bool IsOperation, typename TDerived, NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
11391160class TGRpcRequestWrapperImpl
11401161 : public std::conditional_t <IsOperation,
11411162 TGrpcResponseSenderImpl<TGRpcRequestWrapperImpl<TRpcId, TReq, TResp, IsOperation, TDerived>>,
11421163 IRequestNoOpCtx>
11431164 , public std::conditional_t <TRpcId == TRpcServices::EvGrpcRuntimeRequest,
1144- TEvProxyRuntimeEvent ,
1165+ TEvProxyRuntimeEventWithType<RuntimeEventType> ,
11451166 TEvProxyLegacyEvent<TRpcId, TDerived>>
11461167{
11471168 friend class TProtoResponseHelper ;
@@ -1499,12 +1520,12 @@ class TGRpcRequestWrapperImpl
14991520 TMaybe<TString> TraceId;
15001521};
15011522
1502- template <ui32 TRpcId, typename TReq, typename TResp, bool IsOperation, typename TDerived, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
1503- class TGRpcRequestValidationWrapperImpl : public TGRpcRequestWrapperImpl <TRpcId, TReq, TResp, IsOperation, TDerived, TMethodAccessorTraits> {
1523+ template <ui32 TRpcId, typename TReq, typename TResp, bool IsOperation, typename TDerived, NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
1524+ class TGRpcRequestValidationWrapperImpl : public TGRpcRequestWrapperImpl <TRpcId, TReq, TResp, IsOperation, TDerived, RuntimeEventType, TMethodAccessorTraits> {
15041525public:
15051526
15061527 TGRpcRequestValidationWrapperImpl (NYdbGrpc::IRequestContextBase* ctx)
1507- : TGRpcRequestWrapperImpl<TRpcId, TReq, TResp, IsOperation, TDerived, TMethodAccessorTraits>(ctx)
1528+ : TGRpcRequestWrapperImpl<TRpcId, TReq, TResp, IsOperation, TDerived, RuntimeEventType, TMethodAccessorTraits>(ctx)
15081529 { }
15091530
15101531 bool Validate (TString& error) override {
@@ -1529,13 +1550,13 @@ struct TProtoHasValidate {
15291550
15301551class IFacilityProvider ;
15311552
1532- template <typename TReq, typename TResp, bool IsOperation, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
1553+ template <typename TReq, typename TResp, bool IsOperation, NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, IsOperation>>
15331554class TGrpcRequestCall
15341555 : public std::conditional_t <TProtoHasValidate<TReq>::Value,
15351556 TGRpcRequestValidationWrapperImpl<
1536- TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, TMethodAccessorTraits>, TMethodAccessorTraits>,
1557+ TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, RuntimeEventType, TMethodAccessorTraits>, RuntimeEventType , TMethodAccessorTraits>,
15371558 TGRpcRequestWrapperImpl<
1538- TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, TMethodAccessorTraits>, TMethodAccessorTraits>>
1559+ TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, RuntimeEventType, TMethodAccessorTraits>, RuntimeEventType , TMethodAccessorTraits>>
15391560{
15401561 using TRequestIface = typename std::conditional<IsOperation, IRequestOpCtx, IRequestNoOpCtx>::type;
15411562
@@ -1549,9 +1570,9 @@ class TGrpcRequestCall
15491570
15501571 using TBase = std::conditional_t <TProtoHasValidate<TReq>::Value,
15511572 TGRpcRequestValidationWrapperImpl<
1552- TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, TMethodAccessorTraits>, TMethodAccessorTraits>,
1573+ TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, RuntimeEventType, TMethodAccessorTraits>, RuntimeEventType , TMethodAccessorTraits>,
15531574 TGRpcRequestWrapperImpl<
1554- TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, TMethodAccessorTraits>, TMethodAccessorTraits>>;
1575+ TRpcServices::EvGrpcRuntimeRequest, TReq, TResp, IsOperation, TGrpcRequestCall<TReq, TResp, IsOperation, RuntimeEventType, TMethodAccessorTraits>, RuntimeEventType , TMethodAccessorTraits>>;
15551576
15561577 template <typename TCallback>
15571578 TGrpcRequestCall (NYdbGrpc::IRequestContextBase* ctx, TCallback&& cb, TRequestAuxSettings auxSettings = {})
@@ -1606,11 +1627,11 @@ class TGrpcRequestCall
16061627 const TRequestAuxSettings AuxSettings;
16071628};
16081629
1609- template <typename TReq, typename TResp, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, true >>
1610- using TGrpcRequestOperationCall = TGrpcRequestCall<TReq, TResp, true , TMethodAccessorTraits>;
1630+ template <typename TReq, typename TResp, NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, true >>
1631+ using TGrpcRequestOperationCall = TGrpcRequestCall<TReq, TResp, true , RuntimeEventType, TMethodAccessorTraits>;
16111632
1612- template <typename TReq, typename TResp, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, false >>
1613- using TGrpcRequestNoOperationCall = TGrpcRequestCall<TReq, TResp, false , TMethodAccessorTraits>;
1633+ template <typename TReq, typename TResp, NRuntimeEvents::EType RuntimeEventType = NRuntimeEvents::EType::COMMON, class TMethodAccessorTraits = TYdbGrpcMethodAccessorTraits<TReq, TResp, false >>
1634+ using TGrpcRequestNoOperationCall = TGrpcRequestCall<TReq, TResp, false , RuntimeEventType, TMethodAccessorTraits>;
16141635
16151636template <ui32 TRpcId, typename TReq, typename TResp, bool IsOperation, TRateLimiterMode RlMode = TRateLimiterMode::Off>
16161637class TGRpcRequestWrapper
0 commit comments