[mixnode] replace rocket with axum (#4071)

* axum-equivalent mixnode http api routes

* replaced all rocket routes with axum equivalents

* removed '_axum' suffix from the routes
This commit is contained in:
Jędrzej Stuczyński
2023-10-30 12:55:42 +00:00
committed by GitHub
parent a209b87a41
commit da9d743f39
20 changed files with 159 additions and 92 deletions
+4 -4
View File
@@ -1,6 +1,8 @@
use super::TaskClient;
use futures::channel::mpsc;
use futures::lock::Mutex;
use futures::StreamExt;
use log::{debug, info, trace};
use serde::Serialize;
use std::collections::HashMap;
use std::ops::DerefMut;
@@ -9,8 +11,6 @@ use std::sync::Arc;
use std::time::{Duration, SystemTime};
use tokio::sync::{RwLock, RwLockReadGuard};
use super::TaskClient;
// convenience aliases
type PacketsMap = HashMap<String, u64>;
type PacketDataReceiver = mpsc::UnboundedReceiver<PacketEvent>;
@@ -80,7 +80,7 @@ impl SharedNodeStats {
}
#[derive(Serialize, Clone)]
pub(crate) struct NodeStats {
pub struct NodeStats {
#[serde(serialize_with = "humantime_serde::serialize")]
update_time: SystemTime,
@@ -126,7 +126,7 @@ impl NodeStats {
}
#[derive(Serialize, Clone)]
pub(crate) struct NodeStatsSimple {
pub struct NodeStatsSimple {
#[serde(serialize_with = "humantime_serde::serialize")]
update_time: SystemTime,