connmgr: add ability to respond via router instead of pub #48078
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.
Related to #48073, this completes the implementation in connmgr for sending response data via router. After this, proxy will need to be updated to support receiving response data this way.
Notably, the following changes are made:
make_zhttp_response()
is reworked to support producing either PUB-style or ROUTER-style message formats, returning aSome(addr)
in the case of the latter. It is also made public and shared across modules to reduce code duplication.StreamSharedData
struct. Whenever response data needs to be sent, this flag can be checked to decide whether to respond via ROUTER or not.None
for the address, the value is specified asSome
orNone
depending on whether router-resp was requested.The rest of the changes are mainly tests.