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 ThriftBroker { 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_thriftbroker(const char*,
21  const Comm::EndPoints& endpoints) {
22  char hostname[256];
23  if(gethostname(hostname, sizeof(hostname)) == -1)
24  SWC_THROW(errno, "gethostname");
25 
27  "swcdb", "thriftbroker", hostname, endpoints
28  );
29 
30  level->metrics.emplace_back(
31  net = new Item_Net<Commands>(endpoints, false));
32 
33  // ++ ThriftBroker Metrics
34 }
35 
36 
37 
38 }}} // namespace SWC::ThriftBroker::Metric
SWC::Common::Query::Update::Metric::Reporting::Reporting
Reporting(const SWC::client::Clients::Ptr &a_clients, const Comm::IoContextPtr &a_io, Config::Property::Value_int32_g::Ptr a_cfg_intval, client::Clients::Flag a_executor=client::Clients::DEFAULT)
Definition: MetricsReporting.h:856
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
MetricsReporting.h
SWC
The SWC-DB C++ namespace 'SWC'.
Definition: main.cc:12
SWC::Core::Vector< EndPoint >
SWC::Common::Query::Update::Metric::Reporting
Definition: MetricsReporting.h:851
SWC::Common::Query::Update::Metric::Item_Net
Definition: MetricsReporting.h:72
SWC::Config::Property::Value_int32_g
Definition: Property.h:586