MCPcopy Create free account
hub / github.com/astercloud/aster / Receive

Method Receive

pkg/workflow/actor_engine.go:269–292  ·  view source on GitHub ↗

Receive 处理消息

(ctx *actor.Context, msg actor.Message)

Source from the content-addressed store, hash-verified

267
268// Receive 处理消息
269func (c *CoordinatorActor) Receive(ctx *actor.Context, msg actor.Message) {
270 switch m := msg.(type) {
271 case *actor.Started:
272 wfLog.Info(context.Background(), "coordinator started", nil)
273
274 case *ExecuteWorkflowMsg:
275 c.handleExecuteWorkflow(ctx, m)
276
277 case *NodeCompletedMsg:
278 c.handleNodeCompleted(ctx, m)
279
280 case *NodeFailedMsg:
281 c.handleNodeFailed(ctx, m)
282
283 case *CancelWorkflowMsg:
284 c.handleCancelWorkflow(ctx, m)
285
286 case *actor.Terminated:
287 c.handleTerminated(ctx, m)
288
289 case *actor.Stopping:
290 c.handleStopping(ctx)
291 }
292}
293
294// handleExecuteWorkflow 处理工作流执行请求
295func (c *CoordinatorActor) handleExecuteWorkflow(ctx *actor.Context, msg *ExecuteWorkflowMsg) {

Callers

nothing calls this directly

Calls 7

handleExecuteWorkflowMethod · 0.95
handleNodeCompletedMethod · 0.95
handleNodeFailedMethod · 0.95
handleCancelWorkflowMethod · 0.95
handleTerminatedMethod · 0.95
handleStoppingMethod · 0.95
InfoMethod · 0.65

Tested by

no test coverage detected