Exemple #1
0
func main() {
	//edge := core.NewPipeEdge("A", "O1", "B", "I1")
	//w := edge.Writer()
	//r := edge.Reader()
	var err error
	r, w, _ := os.Pipe()

	sdata := []byte("134.222")
	fmt.Println("sdata:", sdata)
	_, err = w.Write(sdata)
	if err != nil {
		fmt.Println("Write failed:", err)
	}

	var rdata []byte
	_, err = r.Read(rdata)
	if err != nil {
		fmt.Println("Read failed:", err)
	}
	fmt.Println("rdata:", rdata)

	var vv float64
	err = json.Unmarshal(rdata, &vv)
	if err != nil {
		fmt.Println("json.Unmarshal failed:", err)
	}

	graph := gflow.NewGraph(nodes, edges)
	graph.Process()
}
Exemple #2
0
func main() {
	graph := gflow.NewGraph(nodes, edges)
	graph.Process()
}