feat(transport): support streamable http server (#152)

* feat(transport): support streamable http server

* refactor(transport): add common module for shared transport utilities

* perf(tracing): add more log for streamable http session

* fix(test): fix port conflict in test with js

* fix(transport): fix id generating and session management

1. cancel when deleting
2. use `wrapping` and `saturating` correctly

* chore(naming): rename sse server to streamable http server
This commit is contained in:
4t145 2025-05-08 13:57:51 +08:00 • committed by GitHub
commit 57e14c56e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,9 @@
use std::{sync::Arc, time::Duration};
pub type SessionId = Arc<str>;
pub fn session_id() -> SessionId {
uuid::Uuid::new_v4().to_string().into()
}
pub const DEFAULT_AUTO_PING_INTERVAL: Duration = Duration::from_secs(15);