Skip to content

Commit

Permalink
flowd-rs: Change example network to fixed graph node spec (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
ERnsTL committed Aug 30, 2022
1 parent c6a8142 commit 147c121
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flowd-rs/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ fn main() {
}
});
graph.write().expect("lock poisoned").add_node("main_graph".to_owned(), "Repeat".to_owned(), "Repeat_1337".to_owned(), GraphNodeMetadata { x: 180, y: 72, height: Some(72), width: Some(72), label: Some("Repeat_1337".to_owned()) }).expect("add_node() failed");
// add components required for test suite
graph.write().expect("lock poisoned").add_node("main_graph".to_owned(), "Repeat".to_owned(), "Repeat_2ufmu".to_owned(), GraphNodeMetadata { x: 36, y: 216, height: Some(72), width: Some(72), label: Some("Repeat_2ufmu".to_owned()) }).expect("add_node() failed");
graph.write().expect("lock poisoned").add_node("main_graph".to_owned(), "Output".to_owned(), "Output_mwr5y".to_owned(), GraphNodeMetadata { x: 180, y: 216, height: Some(72), width: Some(72), label: Some("Output_mwr5y".to_owned()) }).expect("add_node() failed");
graph.write().expect("lock poisoned").add_node("main_graph".to_owned(), "Drop".to_owned(), "Drop_raux7".to_owned(), GraphNodeMetadata { x: 324, y: 216, height: Some(72), width: Some(72), label: Some("Drop_raux7".to_owned()) }).expect("add_node() failed");
graph.write().expect("lock poisoned").add_edge("main_graph".to_owned(), GraphEdge { source: GraphNodeSpec { process: "".to_owned(), port: "".to_owned(), index: None }, data: Some("test IIP data".to_owned()), target: GraphNodeSpec { process: "Repeat_2ufmu".to_owned(), port: "IN".to_owned(), index: None }, metadata: GraphEdgeMetadata::new(None, None, None) }).expect("add_edge() failed");
graph.write().expect("lock poisoned").add_edge("main_graph".to_owned(), GraphEdge { source: GraphNodeSpec { process: "Repeat_2ufmu".to_owned(), port: "OUT".to_owned(), index: None }, data: None, target: GraphNodeSpec { process: "Output_mwr5y".to_owned(), port: "IN".to_owned(), index: None }, metadata: GraphEdgeMetadata::new(None, None, None) }).expect("add_edge() failed");
graph.write().expect("lock poisoned").add_edge("main_graph".to_owned(), GraphEdge { source: GraphNodeSpec { process: "Output_mwr5y".to_owned(), port: "OUT".to_owned(), index: None }, data: None, target: GraphNodeSpec { process: "Drop_raux7".to_owned(), port: "IN".to_owned(), index: None }, metadata: GraphEdgeMetadata::new(None, None, None) }).expect("add_edge() failed");

let bind_addr = "localhost:3569";
let server = TcpListener::bind(bind_addr).unwrap();
Expand Down

0 comments on commit 147c121

Please sign in to comment.