WrapServerStream returns a ServerStream that has the ability to overwrite context.
(stream grpc.ServerStream)
| 33 | |
| 34 | // WrapServerStream returns a ServerStream that has the ability to overwrite context. |
| 35 | func WrapServerStream(stream grpc.ServerStream) *WrappedServerStream { |
| 36 | if existing, ok := stream.(*WrappedServerStream); ok { |
| 37 | return existing |
| 38 | } |
| 39 | return &WrappedServerStream{ServerStream: stream, WrappedContext: stream.Context()} |
| 40 | } |
| 41 | |
| 42 | type GrpcServer struct { |
| 43 | *grpc.Server |
no test coverage detected