Expand description
RequestEvent construction and emission.
The sole construction site for RequestEvent. handle_request
calls emit once, immediately after the response chain has
finished, before IntoResponse converts the value to an axum
response.
mcpr-cloud/backend/ consumes RequestEvent and session-lifecycle
events — the inline tests below cover the field shapes both rely on.
Functions§
- build_
request_ event - Build a
RequestEventfrom the accumulated context and the final response. Separated fromemitso it can be unit-tested without a live event bus. - emit
- Emit a
Requestevent to the proxy’s event bus. Called once per request, after the response chain. - normalize_
platform - Normalize a client name to a platform identifier used in
SessionStart. Thin re-export ofpipeline::middlewares::shared::normalize_platformso external callers of this module don’t have to reach into the middlewares submodule.