CatapultServer  v0.5.0.1 (Elephant)
DiagnosticHandlers.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <vector>
24 
25 namespace catapult {
26  namespace io { class BlockStorageCache; }
27  namespace ionet { class NodeContainer; }
28  namespace utils { class DiagnosticCounter; }
29 }
30 
31 namespace catapult { namespace handlers {
32 
34  void RegisterDiagnosticCountersHandler(ionet::ServerPacketHandlers& handlers, const std::vector<utils::DiagnosticCounter>& counters);
35 
37  void RegisterDiagnosticNodesHandler(ionet::ServerPacketHandlers& handlers, const ionet::NodeContainer& nodeContainer);
38 
40  void RegisterDiagnosticBlockStatementHandler(ionet::ServerPacketHandlers& handlers, const io::BlockStorageCache& storage);
41 }}
catapult::ionet::NodeContainer::view
NodeContainerView view() const
Gets a read only view of the nodes.
Definition: NodeContainer.cpp:249
DiagnosticCounterValue.h
catapult::ionet::FindAllActiveNodes
NodeSet FindAllActiveNodes(const NodeContainerView &view)
Finds all active nodes in view.
Definition: NodeContainer.cpp:263
catapult::handlers::RegisterDiagnosticCountersHandler
void RegisterDiagnosticCountersHandler(ionet::ServerPacketHandlers &handlers, const std::vector< utils::DiagnosticCounter > &counters)
Registers a diagnostic counters handler in handlers that responds with the current values of counters...
Definition: DiagnosticHandlers.cpp:58
DiagnosticCounter.h
Packet_Type
static constexpr auto Packet_Type
Definition: DiagnosticHandlers.cpp:68
BasicProducer.h
PacketPayloadFactory.h
catapult::ionet::ServerPacketHandlers::registerHandler
void registerHandler(PacketType type, const PacketHandler &handler)
Registers a handler for the specified packet type.
Definition: PacketHandlers.cpp:100
catapult::ionet::NodeContainer
A collection of nodes.
Definition: NodeContainer.h:109
catapult::handlers::RegisterDiagnosticBlockStatementHandler
void RegisterDiagnosticBlockStatementHandler(ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage)
Registers a diagnostic block statement handler in handlers that responds with data from storage.
Definition: DiagnosticHandlers.cpp:145
catapult::io::BlockStorageCache::view
BlockStorageView view() const
Gets a read only view of the storage.
Definition: BlockStorageCache.cpp:176
catapult::handlers::BatchHandlerFactory::RegisterZero
static void RegisterZero(ionet::ServerPacketHandlers &handlers, TResultsProducerFactory resultsProducerFactory)
Definition: HandlerFactory.h:40
m_view
ionet::NodeContainerView m_view
Definition: DiagnosticHandlers.cpp:103
PacketHandlers.h
catapult::ionet::NodeSet
std::unordered_set< Node, NodeHasher > NodeSet
A set of nodes.
Definition: Node.h:128
PackedNodeInfo.h
catapult::io::BlockStorageCache
Definition: BlockStorageCache.h:97
forwardsValidation.info
def info(*args)
Definition: forwardsValidation.py:12
NodeContainer.h
DiagnosticHandlers.h
catapult::handlers::HeightRequestProcessor::Process
static HeightRequestInfo< TRequest > Process(const io::BlockStorageView &storage, const ionet::Packet &packet, ionet::ServerPacketHandlerContext &context, bool shouldAllowZeroHeight)
Definition: HeightRequestProcessor.h:66
catapult::handlers::RegisterDiagnosticNodesHandler
void RegisterDiagnosticNodesHandler(ionet::ServerPacketHandlers &handlers, const ionet::NodeContainer &nodeContainer)
Registers a diagnostic nodes handler in handlers that responds with info about all (active) partner n...
Definition: DiagnosticHandlers.cpp:108
ChainPackets.h
catapult::ionet::PacketPayload
A packet payload that can be written.
Definition: PacketPayload.h:29
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::api::HeightPacket
A packet containing header information and a height.
Definition: ChainPackets.h:45
HandlerFactory.h
catapult::ionet::IsPacketValid
constexpr bool IsPacketValid(const Packet &packet, PacketType type)
Checks if packet is valid with type.
Definition: Packet.h:75
catapult::ionet::ServerPacketHandlers
A collection of packet handlers where there is at most one handler per packet type.
Definition: PacketHandlers.h:62
HeightRequestProcessor.h