Alanxtl commented on code in PR #841:
URL: https://github.com/apache/dubbo-go-pixiu/pull/841#discussion_r2636743345
##########
pkg/filter/http/remote/call.go:
##########
@@ -176,14 +172,14 @@ func (f *Filter) Decode(c *contexthttp.HttpContext)
filter.FilterStatus {
return filter.Continue
}
-func (f *Filter) matchClient(typ apiConf.RequestType) (client.Client, error) {
- switch strings.ToLower(string(typ)) {
- case string(apiConf.DubboRequest):
+func (f *Filter) matchClient(typ string) (client.Client, error) {
Review Comment:
make sure the callers of this func indeed pass in a string
##########
pkg/pool/pool.go:
##########
@@ -72,15 +69,15 @@ func SingletonPool() *ClientPool {
}
// GetClient a factory method to get a client according to apiType .
-func (pool *ClientPool) GetClient(t config.RequestType) (client.Client, error)
{
+func (pool *ClientPool) GetClient(t string) (client.Client, error) {
if pool.poolMap[t] != nil {
return pool.poolMap[t].Get().(client.Client), nil
}
return nil, errors.New("protocol not supported yet")
}
// Put put client to pool.
-func (pool *ClientPool) Put(t config.RequestType, c client.Client) error {
+func (pool *ClientPool) Put(t string, c client.Client) error {
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]