Versions in this module Expand all Collapse all v0 v0.3.0 Mar 31, 2026 v0.2.0 Mar 29, 2026 Changes in this version + func InvokeBidi[Req, Res any](ctx context.Context, spec CallSpec, stream BidiStream[Req, Res], ...) error + func InvokeServerStream[Req, Res any](ctx context.Context, spec CallSpec, req *Request[Req], ...) error + type AnyRequest interface + Any func() any + Meta func() Meta + Spec func() CallSpec + type AnyResponse interface + Any func() any + Meta func() Meta + func NewAnyResponse(msg any) AnyResponse + func NewAnyResponseWithMeta(msg any, meta Meta) AnyResponse + type BidiStream interface + Context func() context.Context + Receive func() (*Request[Req], error) + Send func(*Response[Res]) error + type BidiStreamHandler interface + HandleBidi func(context.Context, BidiStream[Req, Res]) error + type CallShape string + const CallShapeBidi + const CallShapeClientStream + const CallShapeServerStream + const CallShapeUnary + type CallSpec struct + Procedure string + Shape CallShape + Transport Transport + type ClientStream interface + Context func() context.Context + Receive func() (*Request[Req], error) + type ClientStreamHandler interface + Handle func(context.Context, ClientStream[Req]) (*Response[Res], error) + type Code string + const CodeAlreadyExists + const CodeConflict + const CodeInternal + const CodeInvalidArgument + const CodeNotFound + const CodePermissionDenied + const CodeUnauthenticated + const CodeUnavailable + func CodeOf(err error) (Code, bool) + type Conn interface + Context func() context.Context + Receive func() (AnyRequest, error) + Send func(AnyResponse) error + Spec func() CallSpec + type ErrorMapper func(error) (*Status, bool) + type HandlerFunc func(context.Context, Conn) error + type Interceptor interface + Wrap func(HandlerFunc) HandlerFunc + type InterceptorFunc func(HandlerFunc) HandlerFunc + func (f InterceptorFunc) Wrap(next HandlerFunc) HandlerFunc + type Meta struct + Labels map[string]string + Procedure string + RequestID string + SessionID string + type Request struct + Meta Meta + Msg *T + type Response struct + Meta Meta + Msg *T + func InvokeClientStream[Req, Res any](ctx context.Context, spec CallSpec, stream ClientStream[Req], ...) (*Response[Res], error) + func InvokeUnary[Req, Res any](ctx context.Context, spec CallSpec, req *Request[Req], ...) (*Response[Res], error) + type ServerStream interface + Context func() context.Context + Send func(*Response[Res]) error + type ServerStreamHandler interface + HandleStream func(context.Context, *Request[Req], ServerStream[Res]) error + type Status struct + Code Code + Message string + Retryable bool + func StatusOf(err error) (*Status, bool) + type StatusError struct + func Errorf(code Code, format string, args ...any) *StatusError + func NewError(code Code, msg string) *StatusError + func WrapError(code Code, msg string, cause error) *StatusError + func (e *StatusError) Code() Code + func (e *StatusError) Error() string + func (e *StatusError) IsRetryable() bool + func (e *StatusError) Message() string + func (e *StatusError) Status() *Status + func (e *StatusError) Unwrap() error + func (e *StatusError) WithRetryable() *StatusError + type Transport string + const TransportCLI + const TransportConnect + const TransportWS + type UnaryHandler interface + Handle func(context.Context, *Request[Req]) (*Response[Res], error)