Hi,
I was creating a library which allows creating the basic GRPC server for a
client of the library and also running the grpc.Serve method on behalf of
the client.
The client of the library provides a function value which performs the
Service Registration function. This is passed to the library as a
func(){ /* register service code */ }
However, I felt that before calling
grpc.Serve()
, I should check if the service has been registered by checking the output
of
GetServiceInfo()
from the GRPC Server which is newly created. If this is nil, then return an
error to the client of the library indicating that the service has not been
registered and that the client needs to pass in a registration function
(which is generated by the protoc compiler)
Is this a good idea to provide this sort of functionality/error handling
when exposing GRPC boilerplate (such as creating a listener, GRPC
server,etc.) via a custom library package ?
Regards,
N
--
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/261f15bf-ad91-476e-9785-533e11865df2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.