Fix Sse client api (#6685)

* Use reqwest eventsource for get_events api

* await for Event::Open before returning stream

* fmt

* Merge branch 'unstable' into sse-client-fix

* Ignore lint
This commit is contained in:
Pawan Dhananjay
2024-12-18 05:35:58 +05:30
committed by GitHub
parent 1315c94adb
commit 2662dc7f8f
5 changed files with 65 additions and 29 deletions

28
Cargo.lock generated
View File

@@ -2576,6 +2576,7 @@ dependencies = [
"proto_array",
"psutil",
"reqwest",
"reqwest-eventsource",
"sensitive_url",
"serde",
"serde_json",
@@ -2977,6 +2978,17 @@ dependencies = [
"pin-project-lite",
]
[[package]]
name = "eventsource-stream"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab"
dependencies = [
"futures-core",
"nom",
"pin-project-lite",
]
[[package]]
name = "execution_engine_integration"
version = "0.1.0"
@@ -7179,6 +7191,22 @@ dependencies = [
"winreg",
]
[[package]]
name = "reqwest-eventsource"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f529a5ff327743addc322af460761dff5b50e0c826b9e6ac44c3195c50bb2026"
dependencies = [
"eventsource-stream",
"futures-core",
"futures-timer",
"mime",
"nom",
"pin-project-lite",
"reqwest",
"thiserror 1.0.69",
]
[[package]]
name = "resolv-conf"
version = "0.7.0"