You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/07/25 02:18:07 UTC

[GitHub] [incubator-brpc] wwbmmm commented on pull request #1854: support customized server bvar prefix

wwbmmm commented on PR #1854:
URL: https://github.com/apache/incubator-brpc/pull/1854#issuecomment-1193481790

   百度内部是通过gflag来自定义server prefix的,代码大致如下:
   
   ```cpp
   std::string Server::ServerPrefix() const {
       if (FLAGS_customized_server_prefix.empty()) {
            return base::string_printf("%s_%d", g_server_info_prefix, listen_address().port);
       } else {
           return FLAGS_customized_server_prefix;
       }
   }
   ```
   
   可以看下哪种方式更方便一些。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org