Expand description
Breakpoint matcher registration, callback WebSocket client, and handler routing.
This module provides the WebSocket callback stack for interactive breakpoints.
It connects to /_mockserver_callback_websocket, obtains a clientId, and
dispatches paused items to per-breakpoint-id handlers.
Modules§
- phase
- Breakpoint interception phase.
Structs§
- Breakpoint
Matcher Entry - An entry in the list of registered breakpoint matchers.
- Breakpoint
Matcher List - Response from listing breakpoint matchers.
- Breakpoint
Matcher Registration - Registration request for a breakpoint matcher.
- Breakpoint
Matcher Response - Response from registering a breakpoint matcher.
- Paused
Stream Frame - A paused stream frame pushed by the server over the callback WebSocket.
- Stream
Frame Decision - Client-to-server reply for a stream frame decision.
- WsEnvelope
Functions§
- extract_
header - Extract the first value of a header from a JSON request object.
- route_
object_ callback - Route an object-callback request frame to the registered closure.
- route_
request - Route a REQUEST-phase message: dispatch to the per-breakpoint-id handler, auto-continue on missing handler or panic. Returns (type_name, reply_value).
- route_
response - Route a RESPONSE-phase message: dispatch to the per-breakpoint-id handler, auto-continue on missing handler or panic. Returns (type_name, reply_value).
- route_
stream_ frame - Route a stream-frame message: dispatch to the per-breakpoint-id handler, auto-continue on missing handler or panic. Returns (type_name, decision).
- set_
header - Set a header value on a JSON request/response object.
Type Aliases§
- Breakpoint
Request Handler - Handler for REQUEST phase breakpoints. Receives the parsed request JSON. Return a Value that is either:
- Breakpoint
Response Handler - Handler for RESPONSE phase breakpoints. Receives the request and response JSON objects. Return a response Value, or None to auto-continue.
- Breakpoint
Stream Frame Handler - Handler for stream frame breakpoints. Receives the parsed PausedStreamFrame. Return a StreamFrameDecision, or None to auto-continue.
- Object
Response Handler - Handler for object (closure) response callbacks.