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

Function NewConditionStep

pkg/workflow/step.go:286–301  ·  view source on GitHub ↗
(name string, condition func(*StepInput) bool, ifTrue, ifFalse Step)

Source from the content-addressed store, hash-verified

284}
285
286func NewConditionStep(name string, condition func(*StepInput) bool, ifTrue, ifFalse Step) *ConditionStep {
287 return &ConditionStep{
288 id: uuid.New().String(),
289 name: name,
290 condition: condition,
291 ifTrue: ifTrue,
292 ifFalse: ifFalse,
293 config: &StepConfig{
294 Name: name,
295 Type: StepTypeCondition,
296 MaxRetries: 1,
297 Timeout: 5 * time.Minute,
298 SkipOnError: false,
299 },
300 }
301}
302
303func (s *ConditionStep) ID() string { return s.id }
304func (s *ConditionStep) Name() string { return s.name }

Callers 3

mainFunction · 0.92
demoComplexWorkflowFunction · 0.92
testAllStepTypesFunction · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected