Route-level extension management. #2726
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of the work for #2566. Wanted to get some feedback, @hueniverse, before moving forward if you'd like me to. This is meant to be a refactor of how lifecycle hooks are managed so that routes and connections each have their own list of dependency-managed hooks.
The approach is to let each connection keep track of route-level extensions in addition to their own
onRequest
extensions. A route will pull-in its connection's route-level extensions when it's added. When a new extension is added to a connection, it's also added to each route's (and special route's) list of extensions.No tests have been added yet. The one failing test (
188) Methods allows genreateTimeout to be false
) is failing on the current build. There should be no API changes in this PR. If this looks good it can be used to add lifecycle hooks to route configurations.Edit Looks like some PRs have been merged in time to see no failing tests.