@@ -65,10 +65,10 @@ class ServiceProxy {
6565 const ClientCodecPtr& GetClientCodec () { return codec_; }
6666
6767 // / @brief Stop used resources by service proxy (thread-safe).
68- void Stop ();
68+ virtual void Stop ();
6969
7070 // / @brief Destroy used resources by service proxy (thread-safe).
71- void Destroy ();
71+ virtual void Destroy ();
7272
7373 // / @brief Pre-allocate a connection, used for scenarios that require fixed connections for data transmission
7474 // / (thread-safe).
@@ -118,9 +118,18 @@ class ServiceProxy {
118118 // / in the options for non-direct connection models.
119119 const std::string& GetServiceName ();
120120
121+ // Collect statistics on the service proxy and report them to the tvar.
122+ void ProxyStatistics (const ClientContextPtr& ctx);
123+
124+ // Used to determine if the request has timed out. Returns true if timed out, false if normal.
125+ bool CheckTimeout (const ClientContextPtr& context);
126+
121127 // / @brief Use the proxy option parameters to set the context.
122128 void FillClientContext (const ClientContextPtr& context);
123129
130+ // Routing selection interface, retrieve IP and port based on service name and store in ctx.
131+ bool SelectTarget (const ClientContextPtr& context);
132+
124133 // / @brief Run filters by filter point.
125134 int RunFilters (const FilterPoint& point, const ClientContextPtr& context);
126135
@@ -138,9 +147,6 @@ class ServiceProxy {
138147 // Check if the tvar variable required for statistical has been created, and create it if it has not been created.
139148 void PrepareStatistics (const std::string& service_name);
140149
141- // Collect statistics on the service proxy and report them to the tvar.
142- void ProxyStatistics (const ClientContextPtr& ctx);
143-
144150 // Determine if pipeline is supported.
145151 bool SupportPipeline (const std::shared_ptr<ServiceProxyOption>& option);
146152
@@ -156,9 +162,6 @@ class ServiceProxy {
156162 // Execute IO tracking for rpcz.
157163 FilterStatus RunIoFilters (const FilterPoint& point, const std::any& msg) noexcept ;
158164
159- // Routing selection interface, retrieve IP and port based on service name and store in ctx.
160- bool SelectTarget (const ClientContextPtr& context);
161-
162165 // Get connection type by config
163166 ConnectionType GetClientConnectType ();
164167
@@ -169,9 +172,6 @@ class ServiceProxy {
169172 // plugin.
170173 void InitSelectorFilter ();
171174
172- // Used to determine if the request has timed out. Returns true if timed out, false if normal.
173- bool CheckTimeout (const ClientContextPtr& context);
174-
175175 // Error handling, it will set error information to context.
176176 void HandleError (const ClientContextPtr& context, int ret, std::string&& err_msg);
177177
0 commit comments