Hi,

I'm implementing a StreamServerInterceptor.

func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info 
*grpc.StreamServerInfo, handler grpc.StreamHandler) error {
    // do some stuff, like attach a tracer to the context
    return handler(srv, ss)
}

I can read the inbound ctx from ss.Context() but I can't figure out a way 
to replace it on the stream with a derivative Context. The best I can thing 
of is to wrap ss with some other grpc.ServerStream that does what I want. 
Is this the canonical way to do this?

Thanks,

-Franco

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/7146f65d-254d-4dbc-9d04-44e385e6e9d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to