mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-13 17:21:01 +00:00
Merge branch 'master' into dp-add-denylist-for-unwanted-networks
This commit is contained in:
+5
-5
@@ -76,7 +76,7 @@ impl From<&LogLevel> for log::LevelFilter {
|
||||
}
|
||||
|
||||
/// Entry point for connecting nodes
|
||||
#[get("/submit/")]
|
||||
#[get("/submit")]
|
||||
async fn node_route(
|
||||
req: HttpRequest,
|
||||
stream: web::Payload,
|
||||
@@ -102,7 +102,7 @@ async fn node_route(
|
||||
}
|
||||
|
||||
/// Entry point for connecting feeds
|
||||
#[get("/feed/")]
|
||||
#[get("/feed")]
|
||||
async fn feed_route(
|
||||
req: HttpRequest,
|
||||
stream: web::Payload,
|
||||
@@ -116,7 +116,7 @@ async fn feed_route(
|
||||
}
|
||||
|
||||
/// Entry point for network state dump
|
||||
#[get("/network_state/{chain}/{nid}/")]
|
||||
#[get("/network_state/{chain}/{nid}")]
|
||||
async fn state_route(
|
||||
path: web::Path<(Box<str>, NodeId)>,
|
||||
aggregator: web::Data<Addr<Aggregator>>,
|
||||
@@ -145,7 +145,7 @@ async fn state_route(
|
||||
}
|
||||
|
||||
/// Entry point for health check monitoring bots
|
||||
#[get("/health/")]
|
||||
#[get("/health")]
|
||||
async fn health(aggregator: web::Data<Addr<Aggregator>>) -> Result<HttpResponse, Error> {
|
||||
match aggregator.send(GetHealth).await {
|
||||
Ok(count) => {
|
||||
@@ -184,7 +184,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.service(state_route)
|
||||
.service(health)
|
||||
})
|
||||
.bind(format!("{}", opts.socket))?
|
||||
.bind(opts.socket)?
|
||||
.run()
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ impl StreamHandler<Result<ws::Message, ws::ProtocolError>> for NodeConnector {
|
||||
return;
|
||||
}
|
||||
Ok(ws::Message::Pong(_)) => return,
|
||||
Ok(ws::Message::Text(text)) => text.into(),
|
||||
Ok(ws::Message::Text(text)) => text.into_bytes(),
|
||||
Ok(ws::Message::Binary(data)) => data,
|
||||
Ok(ws::Message::Close(_)) => {
|
||||
ctx.stop();
|
||||
|
||||
@@ -11,7 +11,7 @@ use crate::types::{NodeId, NodeLocation};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Locator {
|
||||
client: reqwest::Client,
|
||||
client: reqwest::blocking::Client,
|
||||
cache: Arc<RwLock<FxHashMap<Ipv4Addr, Option<Arc<NodeLocation>>>>>,
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ impl LocatorFactory {
|
||||
|
||||
pub fn create(&self) -> Locator {
|
||||
Locator {
|
||||
client: reqwest::Client::new(),
|
||||
client: reqwest::blocking::Client::new(),
|
||||
cache: self.cache.clone(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user