wrapServerStream returns a ServerStream that has the ability to overwrite context.
(stream grpc.ServerStream)
| 336 | // wrapServerStream returns a ServerStream that has |
| 337 | // the ability to overwrite context. |
| 338 | func wrapServerStream(stream grpc.ServerStream) *wrappedServerStream { |
| 339 | if existing, ok := stream.(*wrappedServerStream); ok { |
| 340 | return existing |
| 341 | } |
| 342 | return &wrappedServerStream{ServerStream: stream, |
| 343 | wrappedContext: stream.Context()} |
| 344 | } |
| 345 | |
| 346 | func AddServerInterceptor() grpc.ServerOption { |
| 347 | return grpc.StreamInterceptor(serverInterceptor) |
no test coverage detected