unwrapErrorStreamClientInterceptor unwraps errors wrapped by OpenTracingStreamClientInterceptor
()
| 9 | |
| 10 | // unwrapErrorStreamClientInterceptor unwraps errors wrapped by OpenTracingStreamClientInterceptor |
| 11 | func unwrapErrorStreamClientInterceptor() grpc.StreamClientInterceptor { |
| 12 | return func(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { |
| 13 | stream, err := streamer(ctx, desc, cc, method, opts...) |
| 14 | if err != nil { |
| 15 | return nil, err |
| 16 | } |
| 17 | |
| 18 | return &unwrapErrorClientStream{ |
| 19 | ClientStream: stream, |
| 20 | }, nil |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | type unwrapErrorClientStream struct { |
| 25 | grpc.ClientStream |
no outgoing calls