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

Function NewFunctionStep

pkg/workflow/step.go:176–189  ·  view source on GitHub ↗
(name string, executor func(ctx context.Context, input *StepInput) (*StepOutput, error))

Source from the content-addressed store, hash-verified

174}
175
176func NewFunctionStep(name string, executor func(ctx context.Context, input *StepInput) (*StepOutput, error)) *FunctionStep {
177 return &FunctionStep{
178 id: uuid.New().String(),
179 name: name,
180 executor: executor,
181 config: &StepConfig{
182 Name: name,
183 Type: StepTypeFunction,
184 MaxRetries: 1,
185 Timeout: 1 * time.Minute,
186 SkipOnError: false,
187 },
188 }
189}
190
191func (s *FunctionStep) ID() string { return s.id }
192func (s *FunctionStep) Name() string { return s.name }

Callers 10

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

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected