MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / StreamServerInterceptor

Function StreamServerInterceptor

pkg/rpcserver/rpcserver_test.go:164–168  ·  view source on GitHub ↗
(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler)

Source from the content-addressed store, hash-verified

162}
163
164func StreamServerInterceptor(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
165 wrapped := grpc_middleware.WrapServerStream(ss)
166 wrapped.WrappedContext = context.WithValue(ss.Context(), &mockKey2{}, "foo")
167 return handler(srv, wrapped)
168}
169
170func (s *mockServer) Subscribe(ids *ttnpb.ApplicationIdentifiers, srv ttnpb.AppAs_SubscribeServer) error {
171 s.subCtx, s.subIDs = srv.Context(), ids

Callers

nothing calls this directly

Calls 2

handlerFunction · 0.85
ContextMethod · 0.65

Tested by

no test coverage detected