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.