forked from flyteorg/flytepropeller
/
Executor.go
157 lines (121 loc) · 4.62 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
admin "github.com/lyft/flyteidl/gen/pb-go/flyteidl/admin"
core "github.com/lyft/flyteidl/gen/pb-go/flyteidl/core"
launchplan "github.com/lyft/flytepropeller/pkg/controller/nodes/subworkflow/launchplan"
mock "github.com/stretchr/testify/mock"
)
// Executor is an autogenerated mock type for the Executor type
type Executor struct {
mock.Mock
}
type Executor_GetStatus struct {
*mock.Call
}
func (_m Executor_GetStatus) Return(_a0 *admin.ExecutionClosure, _a1 error) *Executor_GetStatus {
return &Executor_GetStatus{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *Executor) OnGetStatus(ctx context.Context, executionID *core.WorkflowExecutionIdentifier) *Executor_GetStatus {
c := _m.On("GetStatus", ctx, executionID)
return &Executor_GetStatus{Call: c}
}
func (_m *Executor) OnGetStatusMatch(matchers ...interface{}) *Executor_GetStatus {
c := _m.On("GetStatus", matchers...)
return &Executor_GetStatus{Call: c}
}
// 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
}
type Executor_Initialize struct {
*mock.Call
}
func (_m Executor_Initialize) Return(_a0 error) *Executor_Initialize {
return &Executor_Initialize{Call: _m.Call.Return(_a0)}
}
func (_m *Executor) OnInitialize(ctx context.Context) *Executor_Initialize {
c := _m.On("Initialize", ctx)
return &Executor_Initialize{Call: c}
}
func (_m *Executor) OnInitializeMatch(matchers ...interface{}) *Executor_Initialize {
c := _m.On("Initialize", matchers...)
return &Executor_Initialize{Call: c}
}
// 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
}
type Executor_Kill struct {
*mock.Call
}
func (_m Executor_Kill) Return(_a0 error) *Executor_Kill {
return &Executor_Kill{Call: _m.Call.Return(_a0)}
}
func (_m *Executor) OnKill(ctx context.Context, executionID *core.WorkflowExecutionIdentifier, reason string) *Executor_Kill {
c := _m.On("Kill", ctx, executionID, reason)
return &Executor_Kill{Call: c}
}
func (_m *Executor) OnKillMatch(matchers ...interface{}) *Executor_Kill {
c := _m.On("Kill", matchers...)
return &Executor_Kill{Call: c}
}
// 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
}
type Executor_Launch struct {
*mock.Call
}
func (_m Executor_Launch) Return(_a0 error) *Executor_Launch {
return &Executor_Launch{Call: _m.Call.Return(_a0)}
}
func (_m *Executor) OnLaunch(ctx context.Context, launchCtx launchplan.LaunchContext, executionID *core.WorkflowExecutionIdentifier, launchPlanRef *core.Identifier, inputs *core.LiteralMap) *Executor_Launch {
c := _m.On("Launch", ctx, launchCtx, executionID, launchPlanRef, inputs)
return &Executor_Launch{Call: c}
}
func (_m *Executor) OnLaunchMatch(matchers ...interface{}) *Executor_Launch {
c := _m.On("Launch", matchers...)
return &Executor_Launch{Call: c}
}
// 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
}