Commit Graph

12 Commits

Author SHA1 Message Date
Omar Zabala-Ferrera e8f71dc541
Upgrade several dependencies.
delegate-attr, base64, snafu, bitflags, hostname, and serde_yaml.

Signed-off-by: Omar Zabala-Ferrera <73452461+ozabalaferrera@users.noreply.github.com>
2024-11-06 16:17:43 -05:00
Mark Mandel 38469b245d Batch Event implementation for reqwest bindings
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 <markmandel@google.com>
2023-01-03 17:43:08 -05:00
Jim Crossley c6a84b3c5a Address clippy warnings
Signed-off-by: Jim Crossley <jim@crossleys.org>
2022-11-04 10:34:13 -04:00
minghuaw b8487af97c
Show feature gated bindings in documentaion (#187)
* show feature gated bindings in docsrs

* moved crate root docsrs feature

* fixed cargo fmt check

* removed files that should go with another PR

Signed-off-by: minghuaw <michael.wu1107@gmail.com>
2022-08-24 17:30:43 -04:00
Jakub Noga 8dde763c06
New feature: NATS bindings (#185)
* feat: add NATS protocol bindings

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* chore: run cargo fix & fmt

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* fix: issues with docs

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* Apply suggestions from code review

Co-authored-by: Lazzaretti <fabrizio@lazzaretti.me>

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* feat: apply suggestions from code review

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* feat: add test for v0.3 deserialization

Signed-off-by: Jakub Noga <jakub.noga@softchameleon.io>

* chore: run cargo fmt

Signed-off-by: Fabrizio Lazzaretti <fabrizio@lazzaretti.me>

Co-authored-by: Jakub Noga <jakub.noga@softchameleon.io>
Co-authored-by: Lazzaretti <fabrizio@lazzaretti.me>
2022-07-12 21:51:04 +02:00
Sunli d987002173 New feature: cloudevents-poem
Signed-off-by: Sunli <scott_s829@163.com>
2021-11-07 10:29:16 +08:00
Dejan Bosanac 0741f2bf28 Add support for core http crate binding
Signed-off-by: Dejan Bosanac <dejan@sensatic.net>
2021-10-08 13:23:28 -04:00
andrew webber (personal) 6074b4db7e Add Axum binding
Signed-off-by: andrew webber (personal) <andrewvwebber@googlemail.com>
2021-08-31 15:40:04 -04:00
Jim Crossley b540542040 Factor common response Builder trait out for actix & warp
This proved very difficult due to the different ownership behavior
between each builder, i.e. warp is a consuming builder, actix isn't.

With the use of the Rc/Cell/RefCell, I worry that this is now more
complex than it was, and for all I know, I've introduced a memory leak
somewhere. :)

Since the reqwest builder is also consuming, it should be able to
follow the same "adapter" pattern as warp. Unfortunately, the reqwest
builder doesn't implement the Default trait, so I can't use take() and
I've yet to come up with another solution.

Since 2/3 of the builders are consumers, it's possible we might
simplify the code by having the new Builder trait reflect that,
i.e. using self instead of &self in the fn params. We'll investigate
that next.

For now, I'm just happy to have 2 builders sharing some formerly
redundant behavior.

Signed-off-by: Jim Crossley <jim@crossleys.org>
2021-08-25 16:43:27 -04:00
Jim Crossley ca3ba3b88c Move binding/http mod into its own file
Signed-off-by: Jim Crossley <jim@crossleys.org>
2021-08-17 11:41:13 -04:00
Jim Crossley 211792f0f4
Refactor redundant header logic to a shared lib (#146)
* Refactor redundant header logic to a shared lib

* Remove some unused code

* Share macro between actix and warp, eliminating actix header mod

Fixes #145

Signed-off-by: Jim Crossley <jim@crossleys.org>
2021-07-23 14:00:26 -04:00
Francesco Guardiani 589db8e5be
Renamed features (#140)
* Renamed features
Moved all bindings under a binding crate

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Cargo fmt

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Now this should build

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Use the new cache plugin

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Fix

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Fix the build

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Fixed doc links

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>

* Change link

Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
2021-07-07 10:47:30 +02:00