(name string, executor func(ctx context.Context, input *StepInput) (*StepOutput, error))
| 174 | } |
| 175 | |
| 176 | func 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 | |
| 191 | func (s *FunctionStep) ID() string { return s.id } |
| 192 | func (s *FunctionStep) Name() string { return s.name } |
no test coverage detected