[C++] limiting plugin option on ServerBuilder

29 views
Skip to first unread message

Arpit Baldeva

unread,
Dec 13, 2017, 7:41:32 PM12/13/17
to grpc.io
Hi,

Currently, when the ServerBuilder::BuildAndStart is called, it unilaterally goes ahead and binds all the plugins. In server_builder.cc, 

for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) {
    (*plugin)->InitServer(initializer);
  }  

et al.

Is it possible to add an option to control it? 

The use case I have is that I have multiple grpc server in my application and while I'd like to enable reflection support for grpc_cli usage, I'd like to limit the usage to certain instances. If there is another way to achieve this, please let me know. 

Thanks. 

Yang Gao

unread,
Jan 9, 2018, 8:15:17 PM1/9/18
to grpc.io
Maybe you can use something like ServerBuilderSyncPluginDisabler in async_end2end_test.cc to remove the plugin for those servers.
Reply all
Reply to author
Forward
0 new messages