aboutsummaryrefslogtreecommitdiff
path: root/node/node.hpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-12-01 21:42:51 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2016-12-01 21:43:48 +0100
commit16c28db384adbe61034eb8a2267cd6a886ffd72f (patch)
tree426be5a41f5186ba17e909dda90afca5b7921c30 /node/node.hpp
parent463b8ec708db0d2d7405d434e28d0140c94b1d98 (diff)
downloadcmix-16c28db384adbe61034eb8a2267cd6a886ffd72f.tar.gz
cmix-16c28db384adbe61034eb8a2267cd6a886ffd72f.tar.bz2
cmix-16c28db384adbe61034eb8a2267cd6a886ffd72f.zip
Added the client side code for the statsd in the nodes.
Diffstat (limited to 'node/node.hpp')
-rw-r--r--node/node.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/node/node.hpp b/node/node.hpp
index 3233ba2..1aad503 100644
--- a/node/node.hpp
+++ b/node/node.hpp
@@ -4,6 +4,7 @@
#include "receiver.hpp"
#include "senderreceiver.hpp"
#include "sender.hpp"
+#include "performanceclient.hpp"
#include "api.h"
#include "cmix.h"
@@ -12,6 +13,7 @@
#include <google/protobuf/arena.h>
#include <boost/asio/io_service.hpp>
+#include <boost/optional.hpp>
#include <list>
#include <string>
@@ -50,6 +52,16 @@ struct NodeNetworkSettings {
unsigned int minimum_nr_messages; ///< The minimum number of available messages before starting to run a mix;
};
+/*!
+ * \brief Details if and where to send performance data.
+ */
+struct PerformanceSettings {
+ bool run;
+ std::string host;
+ std::string port;
+ std::string name;
+};
+
template <typename T>
struct ArenaMessage {
google::protobuf::Arena arena;
@@ -76,6 +88,8 @@ class Node
typedef std::list<SSLReceiver> Purgatory;
Purgatory purgatory;
+ boost::optional<PerformanceClient> performance;
+
typedef std::map<std::string, SSLSenderReceiver> ClientConnections;
ClientConnections clients;
typedef std::map<std::string, CMixClientData> ClientData;
@@ -128,7 +142,7 @@ public:
* \param listen_settings The listen settings for the accepter.
* \param network_settings The network settings containing if we are first and who is the next node.
*/
- Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings);
+ Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings, PerformanceSettings performance_settings);
~Node();
/*!