feat(engine): 增加运行熔断、并发短路取消及生命周期钩子
This commit is contained in:
1 parent
693c107473
commit
b9218f2a6a
6 files changed
+567
-38
No files matched your search
@@ -73,3 +73,8 @@ func (g *Graph[S]) AddParallelEdges(from string, targets []string, next string,
|
||||
merger: merger,
|
||||
}
|
||||
}
|
||||
|
||||
// HookFn 是节点执行前后的生命周期钩子函数签名。
|
||||
// nodeName 为当前执行的节点名称,state 为该节点执行时的状态快照(只读语义,请勿修改)。
|
||||
// 可通过此钩子接入日志、链路追踪(OpenTelemetry)、监控指标等能力,而无需修改任何 NodeFn。
|
||||
type HookFn[S any] func(ctx context.Context, nodeName string, state S)
|
||||
Reference in new issue
Block a user