MCPcopy
hub / github.com/nektos/act / NewPipelineExecutor

Function NewPipelineExecutor

pkg/common/executor.go:54–69  ·  view source on GitHub ↗

NewPipelineExecutor creates a new executor from a series of other executors

(executors ...Executor)

Source from the content-addressed store, hash-verified

52
53// NewPipelineExecutor creates a new executor from a series of other executors
54func NewPipelineExecutor(executors ...Executor) Executor {
55 if len(executors) == 0 {
56 return func(_ context.Context) error {
57 return nil
58 }
59 }
60 var rtn Executor
61 for _, executor := range executors {
62 if rtn == nil {
63 rtn = executor
64 } else {
65 rtn = rtn.Then(executor)
66 }
67 }
68 return rtn
69}
70
71// NewConditionalExecutor creates a new executor based on conditions
72func NewConditionalExecutor(conditional Conditional, trueExecutor Executor, falseExecutor Executor) Executor {

Callers 15

CreateMethod · 0.92
StartMethod · 0.92
CopyMethod · 0.92
CopyDirMethod · 0.92
ExecMethod · 0.92
RemoveMethod · 0.92
runUsesContainerMethod · 0.92
newJobExecutorFunction · 0.92
NewPlanExecutorMethod · 0.92
prepareActionExecutorMethod · 0.92
preMethod · 0.92

Calls 1

ThenMethod · 0.95

Tested by 4

TestNewWorkflowFunction · 0.68
TestNewParallelExecutorFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…