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

Function NewEngine

pkg/workflow/engine.go:160–179  ·  view source on GitHub ↗

NewEngine 创建工作流引擎

(config *EngineConfig)

Source from the content-addressed store, hash-verified

158
159// NewEngine 创建工作流引擎
160func NewEngine(config *EngineConfig) (*Engine, error) {
161 if config == nil {
162 config = &EngineConfig{
163 MaxConcurrentWorkflows: 100,
164 MaxConcurrentNodes: 50,
165 DefaultNodeTimeout: time.Minute * 5,
166 DefaultWorkflowTimeout: time.Hour * 2,
167 EnableMetrics: true,
168 }
169 }
170
171 engine := &Engine{
172 config: config,
173 executions: make(map[string]*WorkflowExecution),
174 metrics: &EngineMetrics{},
175 security: &SecurityManager{},
176 }
177
178 return engine, nil
179}
180
181// SetDependencies 设置依赖
182func (e *Engine) SetDependencies(factory AgentFactory, sessionMgr SessionManager, eventBus EventBus) {

Callers 1

NewActorEngineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected