在brpc库中,brpc::ChannelOptions结构体有以下字段:

  1. timeout_ms:设置请求超时时间的毫秒数。
  2. connect_timeout_ms:设置连接超时时间的毫秒数。
  3. max_retry:设置最大重试次数。
  4. tcp_keepalive_time_s:设置TCP keepalive时间的秒数。
  5. tcp_keepalive_timeout_s:设置TCP keepalive超时时间的秒数。
  6. tcp_keepalive_probes:设置TCP keepalive探测次数。
  7. connect_timeout_ms_for_retry:设置连接重试的连接超时时间的毫秒数。
  8. enable_tracing:设置是否启用追踪功能。
  9. tracing_sample_rate:设置追踪采样率。
  10. tracing_max_sample_count:设置追踪最大采样数。
  11. tracing_max_log_count:设置追踪最大日志数。
  12. tracing_report_interval_ms:设置追踪报告间隔时间的毫秒数。
  13. tracing_report_max_count:设置追踪最大报告数。
  14. tracing_report_fail_threshold_ms:设置追踪报告失败阈值的毫秒数。
  15. tracing_report_retry_interval_ms:设置追踪报告重试间隔时间的毫秒数。
  16. tracing_report_retry_times:设置追踪报告重试次数。

这些字段可以通过brpc::ChannelOptions的构造函数或者相应的成员函数进行设置和获取

brpcChannelOptions有哪些字段

原文地址: http://www.cveoy.top/t/topic/icLE 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录