feat: optimized devops debugging example (#37)

drew/english
mrh997 1 year ago committed by GitHub
parent 5f48fc1c04
commit 5dce8ffab4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
}))

Loading…
Cancel
Save