Make it possible to nest runtime components #2909
Merged
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.
Runtime plugins need to be able to wrap components configured in other runtime components. For example, one runtime plugin should be able to wrap the HTTP connector configured in another runtime plugin.
This PR makes this possible by:
RuntimePlugin::runtime_components
so that implementations can reference components configured by previous plugins.The
order
function has three separate order values:Defaults
,Overrides
, andNestedComponents
. TheDefaults
order is currently unused, but will be used later when we refactor how defaults in config work. Everything defaults toOverrides
since most runtime plugins will want to be in this slot. TheNestedComponents
order is specifically for runtime plugins that want to create nested components, and runs at the very end.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.