Merge pull request #125 from nymtech/feature/provider-refactoring

Feature/provider refactoring
This commit is contained in:
Dave Hrycyszyn
2020-03-03 14:13:51 +00:00
committed by GitHub
36 changed files with 1084 additions and 947 deletions
+2
View File
@@ -17,6 +17,8 @@ pub(crate) enum MetricEvent {
}
#[derive(Debug, Clone)]
// Note: you should NEVER create more than a single instance of this using 'new()'.
// You should always use .clone() to create additional instances
struct MixMetrics {
inner: Arc<Mutex<MixMetricsInner>>,
}
+4 -4
View File
@@ -43,7 +43,7 @@ impl MixNode {
}
}
pub fn start_presence_notifier(&self) {
fn start_presence_notifier(&self) {
info!("Starting presence notifier...");
let notifier_config = presence::NotifierConfig::new(
self.config.get_presence_directory_server(),
@@ -55,7 +55,7 @@ impl MixNode {
presence::Notifier::new(notifier_config).start(self.runtime.handle());
}
pub fn start_metrics_reporter(&self) -> metrics::MetricsReporter {
fn start_metrics_reporter(&self) -> metrics::MetricsReporter {
info!("Starting metrics reporter...");
metrics::MetricsController::new(
self.config.get_metrics_directory_server(),
@@ -65,7 +65,7 @@ impl MixNode {
.start(self.runtime.handle())
}
pub fn start_socket_listener(
fn start_socket_listener(
&self,
metrics_reporter: metrics::MetricsReporter,
forwarding_channel: mpsc::UnboundedSender<(SocketAddr, Vec<u8>)>,
@@ -84,7 +84,7 @@ impl MixNode {
);
}
pub fn start_packet_forwarder(&mut self) -> mpsc::UnboundedSender<(SocketAddr, Vec<u8>)> {
fn start_packet_forwarder(&mut self) -> mpsc::UnboundedSender<(SocketAddr, Vec<u8>)> {
info!("Starting packet forwarder...");
// this can later be replaced with topology information