Expand description
WebSocket-based streaming DML ingest endpoint.
Clients open a WebSocket connection per table. The first text frame authenticates the session
and later frames carry unsigned batches of upsert / delete DML messages. Each websocket
payload carries a monotonically increasing dml_batch_id.
Wire format (JSON over text WebSocket frames):
Client → Server (authenticated init):
{"type": "init", "timestamp": 1760000000000}Client → Server (DML batch):
{
"dml_batch_id": 1,
"items": [
{"op": "upsert", "data": {"id": 1, "name": "foo"}},
{"op": "delete", "data": {"id": 1, "name": "foo"}}
]
}Server → Client (ack):
{"ack": 1}Server → Client (fatal — the connection will close):
{"fatal": "DML channel closed, please reconnect"}Structs§
- DmlRequest
- Ingest
Service - Shared state for the ingest service.
- Init
Request 🔒 - Prepared
DmlBatch 🔒 - RawDml
Batch 🔒Request - RawDml
Request
Enums§
Constants§
Functions§
- build_
router - handle_
connection 🔒 - parse_
and_ 🔒validate_ init_ request - prepare_
dml_ 🔒batch_ payload - send_
fatal 🔒 - send_
server_ 🔒message - try_
handle_ 🔒connection - validate_
monotonic_ 🔒dml_ batch_ id - validate_
timestamp_ 🔒skew - ws_
handler
Type Aliases§
- Service
Ref - WsRx 🔒
- WsTx 🔒