Skip to content

Commit

Permalink
feat(devops): optimized devops debugging example
Browse files Browse the repository at this point in the history
  • Loading branch information
mrh997 committed Mar 6, 2025
1 parent 5f48fc1 commit fad87b1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions devops/debug/graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,17 @@ func RegisterSimpleGraph(ctx context.Context) {
return input + " process by node_1,", nil
}))

_ = g.AddLambdaNode("node_2", compose.InvokableLambda(func(ctx context.Context, input string) (output string, err error) {
return input + " process by node_2,", nil
sg := compose.NewGraph[string, string]()
_ = sg.AddLambdaNode("sg_node_1", compose.InvokableLambda(func(ctx context.Context, input string) (output string, err error) {
return input + " process by sg_node_1,", nil
}))

_ = sg.AddEdge(compose.START, "sg_node_1")

_ = sg.AddEdge("sg_node_1", compose.END)

_ = g.AddGraphNode("node_2", sg)

_ = g.AddLambdaNode("node_3", compose.InvokableLambda(func(ctx context.Context, input string) (output string, err error) {
return input + " process by node_3,", nil
}))
Expand Down

0 comments on commit fad87b1

Please sign in to comment.