-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filter work flow rafactor #307
Conversation
# Conflicts: # pkg/common/http/manager.go
…r_split # Conflicts: # pkg/common/extension/filter/filter_chain.go # pkg/common/http/manager.go # pkg/filter/http/httpproxy/routerfilter.go
Codecov Report
@@ Coverage Diff @@
## develop #307 +/- ##
===========================================
+ Coverage 36.78% 38.89% +2.11%
===========================================
Files 54 53 -1
Lines 3262 3121 -141
===========================================
+ Hits 1200 1214 +14
+ Misses 1938 1778 -160
- Partials 124 129 +5
Continue to review full report at Codecov.
|
@mark4z plx fix the github action bugs |
Thanks for preparing the PR! rest LGTM |
# Conflicts: # pkg/filter/http/apiconfig/api_config.go # pkg/filter/http/grpcproxy/descriptor_operation.go # pkg/filter/http/grpcproxy/grpc.go # samples/http/grpc/pixiu/conf.yaml
Approve pls |
case Continue: | ||
continue | ||
case Stop: | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
状态变更这里是否要加日志,方便排查定位
Case:如果我自定义的 Filter 没有成对的 Append |
filter work flow rafactor
What this PR does:
Http Filter的生命周期现在变更为3个阶段
1.HttpFilterPlugin 可以认为是Filter工厂的工厂,CreateFilterFactory()用于注册自己
2.HttpFilterFactory Filter工厂函数,被filter_manager持有,内部会包含创建Filter所需的配置
3.当请求来临,filter_manager会创建一个filter_chain,同步调用每一个HttpFilterFactory.PrepareFilterChain(), 由HttpFilterFactory生成Filter实例并添加到链中
一个例子:
Which issue(s) this PR fixes:
Fixes #253
Special notes for your reviewer:
从pkg/common/http/manager.go:70开始看,会非常直观
Does this PR introduce a user-facing change?: