Documentation
¶
Overview ¶
Package streambridge holds the shared translation helpers every backend bridge uses to convert a provider's native types into the public capabilities types: Forward for the streaming event channel, Map for List* slice results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Forward ¶
func Forward[T any](ctx context.Context, in <-chan T, conv func(T) capabilities.StreamEvent) <-chan capabilities.StreamEvent
Forward translates every event from in through conv onto a buffered output channel, closing it when in is drained. It selects on ctx.Done() for each send so that when the consumer stops reading (stream cancelled, backend switched) the goroutine exits instead of blocking forever on the send — the provider shares ctx and closes in on the same cancellation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.