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

Batch Event implementation for reqwest bindings #200

Merged
merged 1 commit into from
Jan 3, 2023

Conversation

markmandel
Copy link
Contributor

@markmandel markmandel commented Dec 21, 2022

Added events(Vec<Event>) to RequestBuilderExt to provide a batched set of Events to send to an HTTP endpoint, and
into_events() -> Result<Vec<Event>> to ResponseExt to parse a batched Event response.

I deliberately kept things simple, as I thought this would be a good place to start with Batch support throughout the SDK, and the implementation was simple enough, that there didn't seem to be much opportunity for reusable libraries across the SDK. That could be changed as more Batch support is provided across the SDK, and opportunities for code reuse present themselves.

Added `events(Vec<Event>)` to `RequestBuilderExt` to provide a batched
set of Events to send to an HTTP endpoint, and
`into_events() -> Result<Vec<Event>>` to ResponseExt to parse a batched
Event response.

I deliberately kept things simple, as I thought this would be a good
place to start with Batch support throughout the SDK, and the
implementation was simple enough, that there didn't seem to be much
opportunity for reusable libraries across the SDK.
That could be changed as more Batch support is provided across the SDK,
and opportunities for code reuse present themselves.

Signed-off-by: Mark Mandel <[email protected]>
@jcrossley3
Copy link
Contributor

Looks good, thank you! And I agree we can defer adding the batching behavior to the message [de]serializers.

@jcrossley3 jcrossley3 merged commit 38469b2 into cloudevents:main Jan 3, 2023
@markmandel markmandel deleted the reqwest/batch-send branch January 3, 2023 23:27
@markmandel
Copy link
Contributor Author

Awesome! That just made my day 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants