#include <service_impl.hpp>
|
using | WorkGuardT = boost::asio::executor_work_guard< boost::asio::io_context::executor_type > |
|
Definition at line 46 of file service_impl.hpp.
Produces "block.imported" or "notify.finalized" JSON telemetry messages
- Parameters
-
info | - block info to notify about |
origin | - if set, then "block.imported" event produced, otherwise "notify.finalized" |
- Returns
- string with event JSON
Definition at line 322 of file service_impl.cpp.
std::vector< TelemetryEndpoint > kagome::telemetry::TelemetryServiceImpl::chainSpecEndpoints |
( |
| ) |
const |
|
private |
parse telemetry endpoints from chain specification
Definition at line 125 of file service_impl.cpp.
std::string kagome::telemetry::TelemetryServiceImpl::connectedMessage |
( |
| ) |
|
|
private |
produces the greeting message for the (re-)established connections
Definition at line 291 of file service_impl.cpp.
std::string kagome::telemetry::TelemetryServiceImpl::currentTimestamp |
( |
| ) |
const |
|
private |
- Returns
- RFC3339 formatted current timestamp string
Definition at line 283 of file service_impl.cpp.
void kagome::telemetry::TelemetryServiceImpl::delayedNotificationsRoutine |
( |
| ) |
|
|
private |
produces and sends system health notifications
Definition at line 223 of file service_impl.cpp.
void kagome::telemetry::TelemetryServiceImpl::frequentNotificationsRoutine |
( |
| ) |
|
|
private |
produces and sends notifications about best and finalized block
Definition at line 187 of file service_impl.cpp.
bool kagome::telemetry::TelemetryServiceImpl::isEnabled |
( |
| ) |
const |
|
overridevirtual |
void kagome::telemetry::TelemetryServiceImpl::notifyWasSynchronized |
( |
| ) |
|
|
overridevirtual |
Let the telemetry service know that the node has been in a synchronized state at least once.
After this call all kNetworkInitialSync events will be treated as kNetworkBroadcast
Implements kagome::telemetry::TelemetryService.
Definition at line 469 of file service_impl.cpp.
bool kagome::telemetry::TelemetryServiceImpl::prepare |
( |
| ) |
|
|
private |
void kagome::telemetry::TelemetryServiceImpl::prepareGreetingMessage |
( |
| ) |
|
|
private |
Constructs the main and immutable part of JSON to be serialized later as greeting message on new telemetry connections.
Definition at line 245 of file service_impl.cpp.
bool kagome::telemetry::TelemetryServiceImpl::start |
( |
| ) |
|
|
private |
void kagome::telemetry::TelemetryServiceImpl::stop |
( |
| ) |
|
|
private |
std::string kagome::telemetry::TelemetryServiceImpl::systemIntervalMessage1 |
( |
| ) |
|
|
private |
compose system health notification of the first format
Definition at line 386 of file service_impl.cpp.
std::string kagome::telemetry::TelemetryServiceImpl::systemIntervalMessage2 |
( |
| ) |
|
|
private |
compose system health notification of the second format
Definition at line 428 of file service_impl.cpp.
std::vector<std::shared_ptr<TelemetryConnection> > kagome::telemetry::TelemetryServiceImpl::connections_ |
|
private |
libp2p::basic::Scheduler::Handle kagome::telemetry::TelemetryServiceImpl::delayed_timer_ |
|
private |
const bool kagome::telemetry::TelemetryServiceImpl::enabled_ |
|
private |
libp2p::basic::Scheduler::Handle kagome::telemetry::TelemetryServiceImpl::frequent_timer_ |
|
private |
std::string kagome::telemetry::TelemetryServiceImpl::genesis_hash_ |
|
private |
rapidjson::Document kagome::telemetry::TelemetryServiceImpl::greeting_json_ |
|
private |
const libp2p::Host& kagome::telemetry::TelemetryServiceImpl::host_ |
|
private |
std::shared_ptr<boost::asio::io_context> kagome::telemetry::TelemetryServiceImpl::io_context_ |
|
private |
struct { ... } kagome::telemetry::TelemetryServiceImpl::last_finalized_ |
struct { ... } kagome::telemetry::TelemetryServiceImpl::last_imported_ |
log::Logger kagome::telemetry::TelemetryServiceImpl::log_ |
|
private |
std::shared_ptr<MessagePool> kagome::telemetry::TelemetryServiceImpl::message_pool_ |
|
private |
std::shared_ptr<libp2p::basic::Scheduler> kagome::telemetry::TelemetryServiceImpl::scheduler_ |
|
private |
volatile bool kagome::telemetry::TelemetryServiceImpl::shutdown_requested_ = false |
|
private |
bool kagome::telemetry::TelemetryServiceImpl::was_synchronized_ = false |
|
private |
std::shared_ptr<WorkGuardT> kagome::telemetry::TelemetryServiceImpl::work_guard_ |
|
private |
std::shared_ptr<std::thread> kagome::telemetry::TelemetryServiceImpl::worker_thread_ |
|
private |
The documentation for this class was generated from the following files: