connectbridge

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package connectbridge adapts Connect server streams to the gRPC streaming server interfaces that protobuf-generated code expects.

Use it when a connectrpc.com/connect handler needs to delegate a server-streaming RPC to a gRPC-shape service implementation. The adapter wraps a *connect.ServerStream[T] so it satisfies grpc.ServerStreamingServer[T].

Metadata methods (SetHeader, SendHeader, SetTrailer) are no-ops in v1; header and trailer propagation is a future concern.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectStreamBridge

type ConnectStreamBridge[T any] struct {
	// contains filtered or unexported fields
}

ConnectStreamBridge adapts a *connect.ServerStream[T] to satisfy grpc.ServerStreamingServer[T]. It lets a Connect handler delegate a server-streaming RPC to a gRPC-shape service implementation.

SetHeader, SendHeader, and SetTrailer are no-ops; header and trailer propagation is deferred until a consumer needs it.

func NewConnectStreamBridge

func NewConnectStreamBridge[T any](ctx context.Context, s *connect.ServerStream[T]) *ConnectStreamBridge[T]

NewConnectStreamBridge wraps a Connect server stream so it can be passed to gRPC-generated server-streaming code.

func (*ConnectStreamBridge[T]) Context

func (b *ConnectStreamBridge[T]) Context() context.Context

func (*ConnectStreamBridge[T]) RecvMsg

func (b *ConnectStreamBridge[T]) RecvMsg(m any) error

func (*ConnectStreamBridge[T]) Send

func (b *ConnectStreamBridge[T]) Send(msg *T) error

func (*ConnectStreamBridge[T]) SendHeader

func (b *ConnectStreamBridge[T]) SendHeader(metadata.MD) error

func (*ConnectStreamBridge[T]) SendMsg

func (b *ConnectStreamBridge[T]) SendMsg(m any) error

func (*ConnectStreamBridge[T]) SetHeader

func (b *ConnectStreamBridge[T]) SetHeader(metadata.MD) error

func (*ConnectStreamBridge[T]) SetTrailer

func (b *ConnectStreamBridge[T]) SetTrailer(metadata.MD)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL