LCOV - code coverage report
Current view: top level - root/contrail/src/contrail-common/sandesh/library/cpp - sandesh_options.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 21 21 100.0 %
Date: 2026-08-03 02:19:58 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //
       2             : // Copyright (c) 2017 Juniper Networks, Inc. All rights reserved.
       3             : //
       4             : 
       5             : #ifndef LIBRARY_CPP_SANDESH_OPTIONS_H_
       6             : #define LIBRARY_CPP_SANDESH_OPTIONS_H_
       7             : 
       8             : #include <boost/program_options.hpp>
       9             : 
      10             : #include <sandesh/sandesh_constants.h>
      11             : 
      12             : struct SandeshConfig {
      13         432 :     SandeshConfig() :
      14         432 :         http_server_ip(),
      15         432 :         keyfile(),
      16         432 :         certfile(),
      17         432 :         server_keyfile(),
      18         432 :         server_certfile(),
      19         432 :         ca_cert(),
      20         432 :         stats_collector(),
      21         432 :         sandesh_ssl_enable(false),
      22         432 :         introspect_ssl_enable(false),
      23         432 :         introspect_ssl_insecure(false),
      24         432 :         disable_object_logs(false),
      25         432 :         tcp_keepalive_enable(true),
      26         432 :         tcp_keepalive_idle_time(7200),
      27         432 :         tcp_keepalive_probes(9),
      28         432 :         tcp_keepalive_interval(75),
      29         432 :         system_logs_rate_limit(
      30         432 :             g_sandesh_constants.DEFAULT_SANDESH_SEND_RATELIMIT) {
      31         432 :     }
      32         432 :     ~SandeshConfig() {
      33         432 :     }
      34             : 
      35             :     std::string http_server_ip;
      36             :     std::string keyfile;
      37             :     std::string certfile;
      38             :     std::string server_keyfile;
      39             :     std::string server_certfile;
      40             :     std::string ca_cert;
      41             :     std::string stats_collector;
      42             :     bool sandesh_ssl_enable;
      43             :     bool introspect_ssl_enable;
      44             :     bool introspect_ssl_insecure;
      45             :     bool disable_object_logs;
      46             :     bool tcp_keepalive_enable;
      47             :     int tcp_keepalive_idle_time;
      48             :     int tcp_keepalive_probes;
      49             :     int tcp_keepalive_interval;
      50             :     uint32_t system_logs_rate_limit;
      51             : };
      52             : 
      53             : namespace sandesh {
      54             : namespace options {
      55             : 
      56             : void AddOptions(boost::program_options::options_description *sandesh_options,
      57             :     SandeshConfig *sandesh_config);
      58             : void ProcessOptions(const boost::program_options::variables_map &var_map,
      59             :     SandeshConfig *sandesh_config);
      60             : 
      61             : }  // namespace options
      62             : }  // namespace sandesh
      63             : 
      64             : #endif  // LIBRARY_CPP_SANDESH_OPTIONS_H_

Generated by: LCOV version 1.14