Expand description
Bidirectional streaming multiplexer for the Vine gRPC bus.
Owns one bidirectional h2 stream per sidecar. Inbound notifications
fan out to the process-wide broadcast
(Vine::Client::SubscribeNotifications); inbound responses route to the
matching pending-request oneshot sender. Inbound reverse-RPC requests and
cancellations are TODO for a follow-up phase.
This is the P14.1 foundation of Patch 14 - it lands the open(),
Notify(), Request(), and ReadPump skeleton so subsequent phases can
wire SendNotification / SendRequest to consult the multiplexer
when LAND_VINE_STREAMING=1 is set.
Structsยง
- MULTIPLEXERS ๐
- Process-wide registry, one entry per sidecar identifier.
Lookup site for
SendNotification/SendRequestto consult whenLAND_VINE_STREAMING=1. - Multiplexer
- One multiplexer per sidecar connection. Holds the outbound sink, the pending-request correlation map, and a shared-state shutdown flag.
Constantsยง
- SINK_
CAPACITY ๐ - Outbound queue capacity per multiplexer. Bounded so a stalled sidecar applies backpressure to the producer side instead of burning unbounded heap.
Functionsยง
- Read
Pump ๐ - Drain the inbound side of the bidirectional stream. Notifications
fan out to the process-wide broadcast; responses wake the parked
Requestfuture. Reverse-RPC requests and cancellations are recorded for a follow-up phase.