Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 79 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions iroh-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ tokio = { version = "1", features = [
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
serde_json = "1"
n0-tracing-test = "0.3"
# Used by the embedding integration tests.
axum = { version = "0.8", features = ["ws"] }

[build-dependencies]
cfg_aliases = "0.2.1"
Expand Down
10 changes: 6 additions & 4 deletions iroh-relay/src/server/http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ use crate::{
},
};

// type BytesBody = http_body_util::Full<hyper::body::Bytes>;
pub(super) type BytesBody = Box<
/// Boxed HTTP response body produced by [`RelayServiceWithNotify`].
pub type BytesBody = Box<
dyn 'static + Send + Unpin + hyper::body::Body<Data = hyper::body::Bytes, Error = Infallible>,
>;
pub(super) type HyperError = Box<dyn std::error::Error + Send + Sync>;
pub(super) type HyperResult<T> = std::result::Result<T, HyperError>;
/// Boxed error type returned from [`RelayServiceWithNotify`]'s [`hyper::service::Service`] impl.
pub type HyperError = Box<dyn std::error::Error + Send + Sync>;
/// Result alias for HTTP responses produced by [`RelayServiceWithNotify`].
pub type HyperResult<T> = std::result::Result<T, HyperError>;
pub(super) type HyperHandler = Box<
dyn Fn(Request<Incoming>, ResponseBuilder) -> HyperResult<Response<BytesBody>>
+ Send
Expand Down
Loading
Loading