Yes, you can load multiple proto files without any problems. grpc.load has no noticeable side effects, so there should be no problem with running it multiple times.
On Wed, Jun 8, 2016 at 7:55 AM Rob Cecil <[email protected]> wrote: > The use case, is suppose you want to write the implementation of > service1.proto (new grpc.Server()... > addProtoService(pacakge1.SomeService.service...), but also create client > from service2.proto that the first server calls into. > > On Wednesday, June 8, 2016 at 10:53:42 AM UTC-4, Rob Cecil wrote: >> >> All the examples use a single .proto, a single grpc.load(PROTO_PATH)... >> statement. >> >> Is this sort of thing supported? >> >> var PROTO1_PATH = __dirname + '/service1.proto'; >> >> var PROTO2_PATH = __dirname + '/service2.proto'; >> ... >> >> var package1 = grpc.load(PROTO1_PATH).package1; >> var package2 = grpc.load(PROTO2_PATH).package2; >> >> If not, then is the solution to basically merge all services into one >> mega proto that uses import statements? >> >> Thanks! >> > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/a53d648b-4a53-4ad5-b6ce-650c8cf9e648%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/a53d648b-4a53-4ad5-b6ce-650c8cf9e648%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAPK2-4d4Cq7J7uwtN5j9Z97mJNN-Z%3DA9AgSudKUF9OnaefbGyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
