TRPCServer get service_name from 'func' instead of 'callee' because 'callee' is not guaranteed to be service_name from transport protocol.
From transport protocol, they may look like:
func = /a.b.c.service_name/method_namecallee = a.b.c.service_name or any.thing.you.want
Since callee is not actually used to find the service_name in routing in trpc protocol, it's free to set as any other things, usually set as some namespace for configuration or name service.
So in srpc framework, trpc protocol server need to trim the service_name and method_name strictly from func.
TRPCServer get service_name from 'func' instead of 'callee' because 'callee' is not guaranteed to be service_name from transport protocol.
From transport protocol, they may look like:
func
=/a.b.c.service_name/method_name
callee
=a.b.c.service_name
orany.thing.you.want
Since
callee
is not actually used to find the service_name in routing in trpc protocol, it's free to set as any other things, usually set as some namespace for configuration or name service.So in srpc framework, trpc protocol server need to trim the service_name and method_name strictly from
func
.