Expand description
Live match-trace channel — RFC 006.
§What this module provides
A structured event stream that lets a GUI subscriber observe every
incoming HTTP request alongside the rule that matched (or a “miss”
if no rule matched). Events are emitted in-process via a bounded
tokio::sync::broadcast channel.
§What is deliberately stubbed / deferred
The in-process channel is fully implemented. The transport layer
(Unix-domain socket, named pipe, or TCP loopback) that forwards
events to an out-of-process GUI subscriber is stubbed — the
TraceTransport::accept_loop method panics with an explicit
“not yet implemented” message. Implementing it requires
OS-specific IPC plumbing that is scoped to a future release.
§Back-pressure
The channel is bounded by TRACE_CHANNEL_CAPACITY. When the
channel is full (subscriber too slow), broadcast::Sender::send
returns SendError; the emitter drops the event and increments
dropped_count so the next event can report how many were lost.
Structs§
- Match
Trace Event - A single request/response trace event.
- Request
Summary - Key fields from the incoming HTTP request.
- Trace
Emitter - Shared handle to the trace broadcast channel.
- Trace
Transport - Stub transport layer.
Enums§
- Outcome
- What the server decided to do with the request.
- Trace
Transport Config - Configuration for the out-of-process trace transport.
Constants§
- TRACE_
CHANNEL_ CAPACITY - Capacity of the in-process broadcast channel.
Functions§
- now_ms
- Current time as Unix milliseconds.