Skip to main content

Module Multiplexer

Module Multiplexer 

Source
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 (crate::Client::SubscribeNotifications::Fn); inbound responses route to the matching pending-request oneshot sender. Inbound reverse-RPC requests and cancellations are accepted but currently dropped - the unary path remains authoritative until the streaming handler tree on the Cocoon side is enabled.

Activated when LAND_VINE_STREAMING=1 is set and the multiplexer cargo feature is on; this is the LAND-PATCH B7-S6 P14.1 foundation.

Structsยง

MULTIPLEXERS ๐Ÿ”’
Process-wide registry, one entry per sidecar identifier. Lookup site for SendNotification / SendRequest to consult when LAND_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ยง

ReadPump ๐Ÿ”’
Drain the inbound side of the bidirectional stream. Notifications fan out to the process-wide broadcast; responses wake the parked Request future. Reverse-RPC requests and cancellations are recorded for a follow-up phase.