-
Notifications
You must be signed in to change notification settings - Fork 591
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
feat: refactor middleware stack #1398
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1398 +/- ##
==========================================
+ Coverage 79.08% 79.15% +0.07%
==========================================
Files 287 287
Lines 11155 11092 -63
Branches 2360 2340 -20
==========================================
- Hits 8822 8780 -42
+ Misses 2333 2312 -21
Continue to review full report at Codecov.
|
ae04cd6
to
26a2e9b
Compare
26a2e9b
to
beff73e
Compare
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Issue #, if available:
#1377
Description of changes:
This change refactors the middleware stack class into a factory. So that the private data are stored in closure instead of class "private" members. Now, you can instantiate a middleware stack by
constructStack<Input, Output>();
instead ofnew MiddlewareStack<Input, Output>()
.Remove
step
from theaddRelativeTo
options. This way the position of the middleware is solely depend on thetoMiddleware
andrelation
(before or after).Refactor the middleware stack resolution implementation. Now the resolution algorithm is easier to follow & maintain.
/cc @trivikr
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.