SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
MetricsReporting.cc
Go to the documentation of this file.
1 /*
2  * SWC-DB© Copyright since 2019 Alex Kashirin <kashirin.alex@gmail.com>
3  * License details at <https://github.com/kashirin-alex/swc-db/#license>
4  */
5 
6 
8 
9 
10 namespace SWC { namespace Broker { namespace Metric {
11 
12 
15  : Common::Query::Update::Metric::Reporting(
16  Env::Clients::get(), a_io, a_cfg_intval),
17  net(nullptr) {
18 }
19 
20 void Reporting::configure_bkr(const char*, const Comm::EndPoints& endpoints) {
21  char hostname[256];
22  if(gethostname(hostname, sizeof(hostname)) == -1)
23  SWC_THROW(errno, "gethostname");
24 
26  "swcdb", "bkr", hostname, endpoints
27  );
28 
29  level->metrics.emplace_back(
31  endpoints, Env::Config::settings()->get_bool("swc.comm.ssl")));
32 
33  // ++ Broker Metrics
34 }
35 
36 
37 
38 }}} // namespace SWC::Broker::Metric
MetricsReporting.h
SWC::Env::Config::settings
static SWC::Config::Settings::Ptr & settings()
Definition: Settings.h:128
SWC_THROW
#define SWC_THROW(_code_, _msg_)
Definition: Exception.h:134
SWC::Common::Query::Update::Metric::Reporting::configure
virtual Level * configure(const char *group_name, const char *inst_name, const char *host, const Comm::EndPoints &endpoints)
Definition: MetricsReporting.h:865
SWC::Comm::IoContextPtr
std::shared_ptr< IoContext > IoContextPtr
Definition: IoContext.h:16
SWC::Broker::Metric::Reporting::configure_bkr
void configure_bkr(const char *, const Comm::EndPoints &endpoints)
Definition: MetricsReporting.cc:20
SWC::Broker::Metric::Reporting::Reporting
Reporting(const Comm::IoContextPtr &a_io, Config::Property::Value_int32_g::Ptr a_cfg_intval)
Definition: MetricsReporting.cc:13
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Broker::Metric::Reporting
Definition: MetricsReporting.h:23
SWC::Core::Vector< EndPoint >
SWC::Broker::Metric::Reporting::net
Item_Net< Comm::Protocol::Bkr::Commands > * net
Definition: MetricsReporting.h:40
SWC::Common::Query::Update::Metric::Item_Net
Definition: MetricsReporting.h:72
SWC::Config::Property::Value_int32_g
Definition: Property.h:586