feat!: add distributed SSE event store (#1024)
This commit is contained in:
parent
50dd8e2040
commit
aad4d4e4c6
1 changed files with 953 additions and 182 deletions
|
|
@ -376,7 +376,7 @@ impl StreamableHttpClient for UnixSocketHttpClient {
|
|||
async fn get_stream(
|
||||
&self,
|
||||
uri: Arc<str>,
|
||||
session_id: Arc<str>,
|
||||
session_id: Option<Arc<str>>,
|
||||
last_event_id: Option<String>,
|
||||
auth_token: Option<String>,
|
||||
custom_headers: HashMap<HeaderName, HeaderValue>,
|
||||
|
|
@ -396,7 +396,7 @@ impl StreamableHttpClient for UnixSocketHttpClient {
|
|||
async fn get_stream_with_max_sse_event_size(
|
||||
&self,
|
||||
uri: Arc<str>,
|
||||
session_id: Arc<str>,
|
||||
session_id: Option<Arc<str>>,
|
||||
last_event_id: Option<String>,
|
||||
auth_token: Option<String>,
|
||||
custom_headers: HashMap<HeaderName, HeaderValue>,
|
||||
|
|
@ -410,8 +410,11 @@ impl StreamableHttpClient for UnixSocketHttpClient {
|
|||
.header(
|
||||
http::header::ACCEPT,
|
||||
format!("{EVENT_STREAM_MIME_TYPE}, {JSON_MIME_TYPE}"),
|
||||
)
|
||||
.header(HEADER_SESSION_ID, session_id.as_ref());
|
||||
);
|
||||
|
||||
if let Some(session_id) = session_id {
|
||||
builder = builder.header(HEADER_SESSION_ID, session_id.as_ref());
|
||||
}
|
||||
|
||||
if let Some(last_id) = last_event_id {
|
||||
builder = builder.header(HEADER_LAST_EVENT_ID, last_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue