Skip to content
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

Support for ControlMessage as an output type for HttpServerSourceStage and HttpClientSourceStage #1834

Open
wants to merge 56 commits into
base: branch-24.10
Choose a base branch
from

Conversation

dagardner-nv
Copy link
Contributor

@dagardner-nv dagardner-nv commented Aug 7, 2024

Description

  • Add optional message_type, task_type, task_payload arguments to HttpServerSourceStage & HttpClientSourceStage.
  • Add new ConfigurableOutputSource base class for single output source stages which support both MessageMeta and ControlMessage as output types.
  • When ControlMessage output is selected, HTTP request headers will be added to the message's metadata.
  • Define new request handler callback method request_handler_fn_t which receives the boost asio tcp endpoint along with the request object.
  • HttpEndpoint now optionally receives a request_handler_fn_t method, and for compatibility the older payload_parse_fn_t method.
  • Add an optional include_headers argument to HttpEndpointInterfaceProxy::init, which when False (the default) uses the existing payload_parse_fn_t method, and request_handler_fn_t when True. This changes the function signature, but not the behavior when the include_headers argument is omitted, so technically not an API breaking change.
  • Move/rename cm_task_t-->control_message_task_t from deserialize.hpp to be shared with other stages
  • Add a new constructor for ControlMessage which receives a MessageMeta
  • Don't use accept_status for live and ready endpoints, as these should always return 200 on success, while accept_status defaults to 201 CREATED which isn't appropriate for a health check.

Includes isort fix from #1842
Closes #1811

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

@dagardner-nv dagardner-nv added non-breaking Non-breaking change feature request New feature or request skip-ci Optionally Skip CI for this PR labels Aug 7, 2024
@dagardner-nv dagardner-nv self-assigned this Aug 7, 2024
@dagardner-nv dagardner-nv requested a review from a team as a code owner August 7, 2024 17:28
@dagardner-nv dagardner-nv removed the skip-ci Optionally Skip CI for this PR label Aug 7, 2024
@dagardner-nv dagardner-nv changed the title Support for ControlMessage as an output type for HttpServerSourceStage Support for ControlMessage as an output type for HttpServerSourceStage and HttpClientSourceStage Aug 8, 2024
@dagardner-nv dagardner-nv marked this pull request as ready for review August 8, 2024 18:18
@dagardner-nv dagardner-nv requested a review from a team as a code owner August 13, 2024 21:16
@dagardner-nv
Copy link
Contributor Author

/ok to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request non-breaking Non-breaking change
Projects
Status: Review - Ready for Review
Development

Successfully merging this pull request may close these issues.

[FEA]: Support different output data types in the HttpSourceStage
1 participant