zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
29.42k stars 3.97k forks source link

refactor zrpc server interceptor builder #4300

Closed zcong1993 closed 3 months ago

zcong1993 commented 3 months ago

To build zrpc server interceptor in one place, so we can tweak the order easily. And this PR not change any order of server interceptors.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.10%. Comparing base (8690859) to head (c16e42f). Report is 119 commits behind head on master.

Files Patch % Lines
zrpc/server.go 96.15% 0 Missing and 1 partial :warning:
Additional details and impacted files | [Files](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro) | Coverage Δ | | |---|---|---| | [zrpc/internal/rpcpubserver.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300?src=pr&el=tree&filepath=zrpc%2Finternal%2Frpcpubserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-enJwYy9pbnRlcm5hbC9ycGNwdWJzZXJ2ZXIuZ28=) | `76.47% <100.00%> (+1.47%)` | :arrow_up: | | [zrpc/internal/rpcserver.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300?src=pr&el=tree&filepath=zrpc%2Finternal%2Frpcserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-enJwYy9pbnRlcm5hbC9ycGNzZXJ2ZXIuZ28=) | `100.00% <100.00%> (ø)` | | | [zrpc/internal/server.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300?src=pr&el=tree&filepath=zrpc%2Finternal%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-enJwYy9pbnRlcm5hbC9zZXJ2ZXIuZ28=) | `100.00% <ø> (ø)` | | | [zrpc/server.go](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300?src=pr&el=tree&filepath=zrpc%2Fserver.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro#diff-enJwYy9zZXJ2ZXIuZ28=) | `90.24% <96.15%> (+5.43%)` | :arrow_up: | ... and [251 files with indirect coverage changes](https://app.codecov.io/gh/zeromicro/go-zero/pull/4300/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zeromicro)