wsproto

package
v0.6.40 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package wsproto serves gRPC services over ws-proto (protobuf RPC over WebSocket) as a managed public api. It takes the same register function as Service.GRPC, so one implementation serves both, recovers a panicking call into codes.Internal and traces every call like the gRPC server does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve[St any](
	svc *backplane.Service[St], prefix string, origins api.Origins,
	register func(grpc.ServiceRegistrar), opts ...api.WSProtoOption,
)

Serve mounts a ws-proto endpoint at prefix on a public port of svc and announces it with the registered services' descriptors. origins is the browser origin policy: the zero value admits same-origin browsers and non-browser clients only. api.Interceptors and api.StreamInterceptors wrap this endpoint's calls only; api.Middleware wraps its upgrade handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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