dk-lockdown commented on a change in pull request #260:
URL: https://github.com/apache/dubbo-go-pixiu/pull/260#discussion_r718057760
##########
File path: pkg/filter/http/httpproxy/routerfilter.go
##########
@@ -51,15 +51,17 @@ type (
cfg *Config
}
// Config describe the config of Filter
- Config struct{}
+ Config struct {
+ client *http3.Client
Review comment:
transport 是一个 interface,直接反序列化 client 怎么样知道 transport 反序列化到哪个对象上呢。
##########
File path: pkg/filter/http/httpproxy/routerfilter.go
##########
@@ -51,15 +51,17 @@ type (
cfg *Config
}
// Config describe the config of Filter
- Config struct{}
+ Config struct {
+ client *http3.Client
Review comment:
```
func (fm *FilterManager) Apply(name string, conf map[string]interface{})
(HttpFilter, error) {
plugin, err := GetHttpFilterPlugin(name)
if err != nil {
return nil, errors.New("filter not found")
}
filter, err := plugin.CreateFilter()
if err != nil {
return nil, errors.New("plugin create filter error")
}
factoryConf := filter.Config()
//filter 的 config 是通过 yaml 反序列化去初始化的。
if err := yaml.ParseConfig(factoryConf, conf); err != nil {
return nil, errors.Wrap(err, "config error")
}
err = filter.Apply()
if err != nil {
return nil, errors.Wrap(err, "create fail")
}
return filter, nil
}
```
见上面代码注释
##########
File path: pkg/filter/http/httpproxy/routerfilter.go
##########
@@ -51,15 +51,17 @@ type (
cfg *Config
}
// Config describe the config of Filter
- Config struct{}
+ Config struct {
+ client *http3.Client
Review comment:
这样应该没问题
--
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]