WIP
This commit is contained in:
@@ -5,20 +5,19 @@ authors = ["Dominik Werder <dominik.werder@gmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
hyper = "0.14"
|
||||
http = "0.2"
|
||||
futures-util = "0.3.14"
|
||||
bytes = "1.0.1"
|
||||
bytes = "1.5.0"
|
||||
#dashmap = "3"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_yaml = "0.9.16"
|
||||
chrono = "0.4"
|
||||
url = "2.2.2"
|
||||
clap = { version = "4.3.21", features = ["derive", "cargo"] }
|
||||
serde_yaml = "0.9.27"
|
||||
chrono = "0.4.31"
|
||||
url = "2.5.0"
|
||||
clap = { version = "4.4.11", features = ["derive", "cargo"] }
|
||||
err = { path = "../err" }
|
||||
taskrun = { path = "../taskrun" }
|
||||
netpod = { path = "../netpod" }
|
||||
disk = { path = "../disk" }
|
||||
httpclient = { path = "../httpclient" }
|
||||
daqbufp2 = { path = "../daqbufp2" }
|
||||
|
||||
@@ -84,7 +84,18 @@ async fn go() -> Result<(), Error> {
|
||||
let cfg = cfg?;
|
||||
daqbufp2::run_node(cfg, service_version).await?;
|
||||
} else if let Ok(cfg) = serde_yaml::from_slice::<NodeConfig>(&buf) {
|
||||
info!("Parsed yaml config from {}", subcmd.config);
|
||||
let sp = span!(Level::INFO, "parse", id = 123u32);
|
||||
sp.in_scope(|| {
|
||||
let sp = span!(Level::TRACE, "sptrace");
|
||||
sp.in_scope(|| {
|
||||
let sp = span!(Level::INFO, "cfg", file = "some");
|
||||
sp.in_scope(|| {
|
||||
debug!("Parsed yaml config from {}", subcmd.config);
|
||||
info!("Parsed yaml config from {}", subcmd.config);
|
||||
warn!("Parsed yaml config from {}", subcmd.config);
|
||||
});
|
||||
});
|
||||
});
|
||||
let cfg: Result<NodeConfigCached, Error> = cfg.into();
|
||||
let cfg = cfg?;
|
||||
daqbufp2::run_node(cfg, service_version).await?;
|
||||
@@ -138,9 +149,11 @@ async fn go() -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// TODO test data needs to be generated
|
||||
// TODO test data needs to be generated.
|
||||
// TODO use httpclient for the request: need to add binary POST.
|
||||
//#[test]
|
||||
#[allow(unused)]
|
||||
#[cfg(DISABLED)]
|
||||
fn simple_fetch() {
|
||||
use daqbuffer::err::ErrConv;
|
||||
use netpod::timeunits::*;
|
||||
|
||||
@@ -13,6 +13,4 @@ impl<T, E: Convable> ErrConv<T> for Result<T, E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Convable for http::Error {}
|
||||
impl Convable for hyper::Error {}
|
||||
impl Convable for serde_yaml::Error {}
|
||||
|
||||
Reference in New Issue
Block a user