CatapultServer  v0.5.0.1 (Elephant)
ApiNodeHealthUtils.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/api/ChainApi.h"
23 #include "catapult/thread/Future.h"
24 
25 namespace catapult {
26  namespace ionet { class Node; }
27  namespace thread { class IoThreadPool; }
28 }
29 
30 namespace catapult { namespace tools { namespace health {
31 
34  thread::future<api::ChainInfo> CreateApiNodeChainInfoFuture(thread::IoThreadPool& pool, const ionet::Node& node);
35 }}}
CATAPULT_LOG
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
m_endpoint
boost::asio::ip::tcp::endpoint m_endpoint
Definition: ApiNodeHealthUtils.cpp:153
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::thread::IoThreadPool
Represents a thread pool that shares a single io context across multiple threads.
Definition: IoThreadPool.h:30
ChainApi.h
boost
Definition: IoThreadPool.h:25
ApiNodeHealthUtils.h
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
catapult::ionet::ConnectResult
ConnectResult
Enumeration of possible connection results.
Definition: ConnectResult.h:41
m_resolver
ResolverType m_resolver
Definition: ApiNodeHealthUtils.cpp:148
ConnectResult.h
catapult::thread::IoThreadPool::ioContext
virtual boost::asio::io_context & ioContext()=0
Gets the underlying io_context.
m_request
boost::asio::streambuf m_request
Definition: ApiNodeHealthUtils.cpp:305
catapult::thread::future
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
Node.h
IoThreadPool.h
m_connector
SocketConnector m_connector
Definition: ApiNodeHealthUtils.cpp:302
forwardsValidation.info
def info(*args)
Definition: forwardsValidation.py:12
catapult::catapult_runtime_error
catapult_error< std::runtime_error > catapult_runtime_error
Definition: exceptions.h:87
catapult::tools::health::CreateApiNodeChainInfoFuture
thread::future< api::ChainInfo > CreateApiNodeChainInfoFuture(thread::IoThreadPool &pool, const ionet::Node &node)
Definition: ApiNodeHealthUtils.cpp:315
catapult::ionet::socket
boost::asio::ip::tcp::socket socket
Definition: IoTypes.h:30
m_promise
thread::promise< ionet::ConnectResult > m_promise
Definition: ApiNodeHealthUtils.cpp:154
m_apiUris
std::vector< std::string > m_apiUris
Definition: ApiNodeHealthUtils.cpp:303
m_numUnmatchedOpenBraces
size_t m_numUnmatchedOpenBraces
Definition: ApiNodeHealthUtils.cpp:63
catapult::chain::CosignersValidationResult::Success
All cosigners are eligible and sufficient.
m_values
ResultType m_values
Definition: ApiNodeHealthUtils.cpp:308
m_response
boost::asio::streambuf m_response
Definition: ApiNodeHealthUtils.cpp:306
catapult::ionet::Node::endpoint
const NodeEndpoint & endpoint() const
Gets the endpoint.
Definition: Node.cpp:64
catapult::ionet::NodeEndpoint::Host
std::string Host
Host.
Definition: Node.h:37
catapult::api::ChainInfo
Information about a chain.
Definition: ChainApi.h:31
catapult::api::ChainInfo::Score
model::ChainScore Score
Chain score.
Definition: ChainApi.h:36
ConfigurationValueParsers.h
Node
ionet::Node Node
Definition: PacketWriters.cpp:45
ChainScore
model::ChainScore ChainScore
Definition: tools/health/main.cpp:43
catapult
Definition: AddressExtractionExtension.cpp:28
m_query
ResolverType::query m_query
Definition: ApiNodeHealthUtils.cpp:151
m_host
std::string m_host
Definition: ApiNodeHealthUtils.cpp:150
m_socket
boost::asio::ip::tcp::socket m_socket
Definition: ApiNodeHealthUtils.cpp:147
Future.h
catapult::api::ChainInfo::Height
catapult::Height Height
Chain height.
Definition: ChainApi.h:33
catapult::utils::TryParseValue
bool TryParseValue(const std::string &str, LogLevel &parsedValue)
Tries to parse str into a log level (parsedValue).
Definition: ConfigurationValueParsers.cpp:60
catapult::ionet::Node
A node in the catapult network.
Definition: Node.h:82