This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
Executor.go
79 lines (63 loc) · 2.48 KB
/
Executor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Code generated by mockery v1.0.0. DO NOT EDIT.
package mocks
import admin "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin"
import context "context"
import core "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"
import launchplan "github.com/lyft/flytepropeller/pkg/controller/nodes/subworkflow/launchplan"
import mock "github.com/stretchr/testify/mock"
// Executor is an autogenerated mock type for the Executor type
type Executor struct {
mock.Mock
}
// GetStatus provides a mock function with given fields: ctx, executionID
func (_m *Executor) GetStatus(ctx context.Context, executionID *core.WorkflowExecutionIdentifier) (*admin.ExecutionClosure, error) {
ret := _m.Called(ctx, executionID)
var r0 *admin.ExecutionClosure
if rf, ok := ret.Get(0).(func(context.Context, *core.WorkflowExecutionIdentifier) *admin.ExecutionClosure); ok {
r0 = rf(ctx, executionID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*admin.ExecutionClosure)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *core.WorkflowExecutionIdentifier) error); ok {
r1 = rf(ctx, executionID)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Initialize provides a mock function with given fields: ctx
func (_m *Executor) Initialize(ctx context.Context) error {
ret := _m.Called(ctx)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// Kill provides a mock function with given fields: ctx, executionID, reason
func (_m *Executor) Kill(ctx context.Context, executionID *core.WorkflowExecutionIdentifier, reason string) error {
ret := _m.Called(ctx, executionID, reason)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *core.WorkflowExecutionIdentifier, string) error); ok {
r0 = rf(ctx, executionID, reason)
} else {
r0 = ret.Error(0)
}
return r0
}
// Launch provides a mock function with given fields: ctx, launchCtx, executionID, launchPlanRef, inputs
func (_m *Executor) Launch(ctx context.Context, launchCtx launchplan.LaunchContext, executionID *core.WorkflowExecutionIdentifier, launchPlanRef *core.Identifier, inputs *core.LiteralMap) error {
ret := _m.Called(ctx, launchCtx, executionID, launchPlanRef, inputs)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, launchplan.LaunchContext, *core.WorkflowExecutionIdentifier, *core.Identifier, *core.LiteralMap) error); ok {
r0 = rf(ctx, launchCtx, executionID, launchPlanRef, inputs)
} else {
r0 = ret.Error(0)
}
return r0
}