Go to the documentation of this file.
9 #ifndef EAGINE_LOGGING_TYPE_REMOTE_NODE_HPP
10 #define EAGINE_LOGGING_TYPE_REMOTE_NODE_HPP
12 #include "../../message_bus/remote_node.hpp"
19 adapt_log_entry_arg(
identifier name,
const msgbus::remote_node& value) {
20 return [name, value](logger_backend& backend) {
22 name,
EAGINE_ID(uint64), extract_or(value.id(), 0U));
24 if(
auto opt_id{value.instance_id()}) {
33 EAGINE_ID(isRutrNode), yes_no_maybe(value.is_router_node()));
35 EAGINE_ID(isBrdgNode), yes_no_maybe(value.is_bridge_node()));
37 EAGINE_ID(isPingable), yes_no_maybe(value.is_pingable()));
39 EAGINE_ID(isRespnsve), yes_no_maybe(value.is_responsive()));
41 if(
const auto opt_rate{value.ping_success_rate()}) {
45 if(
const auto opt_bld{value.instance().build()}) {
49 if(
const auto opt_name{value.app_name()}) {
54 if(
const auto opt_name{value.display_name()}) {
59 if(
const auto opt_desc{value.description()}) {
67 adapt_log_entry_arg(
identifier name,
const msgbus::remote_host& value) {
68 return [name, value](logger_backend& backend) {
70 name,
EAGINE_ID(uint64), extract_or(value.id(), 0U));
72 if(
const auto opt_name{value.name()}) {
77 if(
const auto opt_val{value.cpu_concurrent_threads()}) {
81 if(
const auto opt_val{value.total_ram_size()}) {
85 if(
const auto opt_val{value.free_ram_size()}) {
89 if(
const auto opt_val{value.free_swap_size()}) {
93 if(
const auto opt_val{value.total_swap_size()}) {
97 if(
const auto opt_val{value.ram_usage()}) {
101 if(
const auto opt_val{value.swap_usage()}) {
105 if(
const auto opt_val{value.short_average_load()}) {
109 if(
const auto opt_val{value.long_average_load()}) {
118 #endif // EAGINE_LOGGING_TYPE_REMOTE_NODE_HPP
#define EAGINE_ID(NAME)
Macro for constructing instances of eagine::identifier.
Definition: identifier.hpp:353
Common code is placed in this namespace.
Definition: eagine.hpp:21
static constexpr auto extract(api_result_value< Result, api_result_validity::never > &) noexcept -> Result &
Overload of extract for api_result_value.
Definition: c_api_wrap.hpp:270
basic_identifier< 10, 6, default_identifier_char_set, identifier_t > identifier
Default identifier type used throughout the project.
Definition: identifier.hpp:346