Hi Grpc team!
I have a ServerInterceptor instance for my grpc server, it does something
like this:
@Override
public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(
ServerCall<ReqT, RespT> call, Metadata headers,
ServerCallHandler<ReqT, RespT> next) {
Context context = Context.current();
.... // more code here
context = context.withValue(USER_ID, "my-user-id");
return Contexts.interceptCall(context, call, headers, next);
}
and in my service method I get access to the userId using smth like this:
USER_ID.get()
I have some questions:
Is this implementation correct?
Is this thread safe?
Is there any way to test that implementation?
Is there any documentation that I can check to understand how Threads are
handled by the grpc server?
Thanks in advance! :)
Edu-
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/928b79d2-8b8c-4b0f-bc8f-51a4bc0dcd5an%40googlegroups.com.