feat: allow failable service creation in streamable HTTP tower service (#244)

* feat: allow failable service creation in streamable HTTP tower service

In our setup we need to lookup some info that may fail before we serve
the request.

* Fix examples build
This commit is contained in:
John Howard 2025-06-15 10:13:35 -07:00 • committed by GitHub
commit 73188eff6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,7 +96,7 @@ async fn test_with_js_streamable_http_client() -> anyhow::Result<()> {
let service: StreamableHttpService<Calculator, LocalSessionManager> =
StreamableHttpService::new(
Calculator::default,
|| Ok(Calculator),
Default::default(),
StreamableHttpServerConfig {
stateful_mode: true,