macula_stream_local (macula v3.13.0)
View SourceLocal registry + dispatcher for streaming RPC.
Phase 1 of PLAN_MACULA_STREAMING.md ships LOCAL streaming only — the client-side and server-side macula_stream processes both live in the same BEAM and are paired with macula_stream_v1:pair/2. This module is the registry that lets call_stream find a locally- advertised handler for a given procedure name.
Phase 2 will add a parallel path through macula_mesh_client that bridges streams to QUIC. The public SDK surface in macula.erl stays the same; macula_stream_local becomes a fast in-process short-circuit for procedures advertised on the same node.
Summary
Functions
Advertise a streaming procedure (default mode: server_stream).
Open a server-stream call. Returns the client-side stream pid. The caller drains chunks with macula_stream_v1:recv/2.
Open a client-stream or bidi call. Returns the client-side stream pid; caller writes with macula_stream_v1:send/2,3 and reads the terminal value with macula_stream_v1:await_reply/1,2.
Types
-type mode() :: macula_stream_v1:mode().
Functions
Advertise a streaming procedure (default mode: server_stream).
Open a server-stream call. Returns the client-side stream pid. The caller drains chunks with macula_stream_v1:recv/2.
Open a client-stream or bidi call. Returns the client-side stream pid; caller writes with macula_stream_v1:send/2,3 and reads the terminal value with macula_stream_v1:await_reply/1,2.
-spec unadvertise(binary()) -> ok.