MCPcopy Create free account
hub / github.com/cortexproject/cortex / unwrapErrorStreamClientInterceptor

Function unwrapErrorStreamClientInterceptor

pkg/util/grpcclient/unwrap.go:11–22  ·  view source on GitHub ↗

unwrapErrorStreamClientInterceptor unwraps errors wrapped by OpenTracingStreamClientInterceptor

()

Source from the content-addressed store, hash-verified

9
10// unwrapErrorStreamClientInterceptor unwraps errors wrapped by OpenTracingStreamClientInterceptor
11func 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
24type unwrapErrorClientStream struct {
25 grpc.ClientStream

Callers 3

InstrumentFunction · 0.85
InstrumentReusableStreamFunction · 0.85

Calls

no outgoing calls

Tested by 1