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

Function New

pkg/workflow/workflow.go:68–88  ·  view source on GitHub ↗

New 创建新的 Workflow

(name string)

Source from the content-addressed store, hash-verified

66
67// New 创建新的 Workflow
68func New(name string) *Workflow {
69 return &Workflow{
70 ID: uuid.New().String(),
71 Name: name,
72 Steps: make([]Step, 0),
73 MaxRetries: 3,
74 Timeout: 30 * time.Minute,
75 RetryDelay: 1 * time.Second,
76 Stream: false,
77 StreamEvents: false,
78 StreamExecutorEvents: true,
79 DebugMode: false,
80 StoreEvents: false,
81 StoreExecutorOutputs: true,
82 SkipEvents: make([]WorkflowEventType, 0),
83 Metadata: make(map[string]any),
84 AddWorkflowHistory: false,
85 NumHistoryRuns: 3,
86 CacheSession: false,
87 }
88}
89
90// ===== 流式 API =====
91

Callers 8

mainFunction · 0.92
demoComplexWorkflowFunction · 0.92
demoWorkflowAgentFunction · 0.92
testBasicWorkflowFunction · 0.92
testAllStepTypesFunction · 0.92
testRouterFunction · 0.92
testWorkflowAgentFunction · 0.92
mainFunction · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected