Reference self Node by host and optionally port, get rid of DType

This commit is contained in:
Dominik Werder
2021-05-01 11:31:10 +02:00
parent c4fa5dcc28
commit 0f9408e9f8
11 changed files with 44 additions and 64 deletions
+2 -3
View File
@@ -30,7 +30,7 @@ async fn go() -> Result<(), Error> {
let node_config: NodeConfig = serde_json::from_slice(&buf)?;
let node = node_config
.get_node()
.ok_or(Error::with_msg(format!("nodeid config error")))?;
.ok_or(Error::with_msg(format!("nodeid config error {:?}", node_config)))?;
retrieval::run_node(node_config.clone(), node.clone()).await?;
}
SubCmd::Client(client) => match client.client_type {
@@ -54,7 +54,6 @@ fn simple_fetch() {
taskrun::run(async {
let t1 = chrono::Utc::now();
let node = Node {
id: format!("{:02}", 0),
host: "localhost".into(),
listen: "0.0.0.0".into(),
port: 8360,
@@ -91,7 +90,7 @@ fn simple_fetch() {
},
};
let node_config = NodeConfig {
nodeid: cluster.nodes[0].id.clone(),
name: format!("{}:{}", cluster.nodes[0].host, cluster.nodes[0].port),
cluster,
};
let node = node_config.get_node().unwrap();