forked from flyteorg/flytepropeller
/
node.go
182 lines (142 loc) · 4.73 KB
/
node.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
handler "github.com/lyft/flytepropeller/pkg/controller/nodes/handler"
mock "github.com/stretchr/testify/mock"
)
// Node is an autogenerated mock type for the Node type
type Node struct {
mock.Mock
}
type Node_Abort struct {
*mock.Call
}
func (_m Node_Abort) Return(_a0 error) *Node_Abort {
return &Node_Abort{Call: _m.Call.Return(_a0)}
}
func (_m *Node) OnAbort(ctx context.Context, executionContext handler.NodeExecutionContext, reason string) *Node_Abort {
c := _m.On("Abort", ctx, executionContext, reason)
return &Node_Abort{Call: c}
}
func (_m *Node) OnAbortMatch(matchers ...interface{}) *Node_Abort {
c := _m.On("Abort", matchers...)
return &Node_Abort{Call: c}
}
// Abort provides a mock function with given fields: ctx, executionContext, reason
func (_m *Node) Abort(ctx context.Context, executionContext handler.NodeExecutionContext, reason string) error {
ret := _m.Called(ctx, executionContext, reason)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, handler.NodeExecutionContext, string) error); ok {
r0 = rf(ctx, executionContext, reason)
} else {
r0 = ret.Error(0)
}
return r0
}
type Node_Finalize struct {
*mock.Call
}
func (_m Node_Finalize) Return(_a0 error) *Node_Finalize {
return &Node_Finalize{Call: _m.Call.Return(_a0)}
}
func (_m *Node) OnFinalize(ctx context.Context, executionContext handler.NodeExecutionContext) *Node_Finalize {
c := _m.On("Finalize", ctx, executionContext)
return &Node_Finalize{Call: c}
}
func (_m *Node) OnFinalizeMatch(matchers ...interface{}) *Node_Finalize {
c := _m.On("Finalize", matchers...)
return &Node_Finalize{Call: c}
}
// Finalize provides a mock function with given fields: ctx, executionContext
func (_m *Node) Finalize(ctx context.Context, executionContext handler.NodeExecutionContext) error {
ret := _m.Called(ctx, executionContext)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, handler.NodeExecutionContext) error); ok {
r0 = rf(ctx, executionContext)
} else {
r0 = ret.Error(0)
}
return r0
}
type Node_FinalizeRequired struct {
*mock.Call
}
func (_m Node_FinalizeRequired) Return(_a0 bool) *Node_FinalizeRequired {
return &Node_FinalizeRequired{Call: _m.Call.Return(_a0)}
}
func (_m *Node) OnFinalizeRequired() *Node_FinalizeRequired {
c := _m.On("FinalizeRequired")
return &Node_FinalizeRequired{Call: c}
}
func (_m *Node) OnFinalizeRequiredMatch(matchers ...interface{}) *Node_FinalizeRequired {
c := _m.On("FinalizeRequired", matchers...)
return &Node_FinalizeRequired{Call: c}
}
// FinalizeRequired provides a mock function with given fields:
func (_m *Node) FinalizeRequired() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
type Node_Handle struct {
*mock.Call
}
func (_m Node_Handle) Return(_a0 handler.Transition, _a1 error) *Node_Handle {
return &Node_Handle{Call: _m.Call.Return(_a0, _a1)}
}
func (_m *Node) OnHandle(ctx context.Context, executionContext handler.NodeExecutionContext) *Node_Handle {
c := _m.On("Handle", ctx, executionContext)
return &Node_Handle{Call: c}
}
func (_m *Node) OnHandleMatch(matchers ...interface{}) *Node_Handle {
c := _m.On("Handle", matchers...)
return &Node_Handle{Call: c}
}
// Handle provides a mock function with given fields: ctx, executionContext
func (_m *Node) Handle(ctx context.Context, executionContext handler.NodeExecutionContext) (handler.Transition, error) {
ret := _m.Called(ctx, executionContext)
var r0 handler.Transition
if rf, ok := ret.Get(0).(func(context.Context, handler.NodeExecutionContext) handler.Transition); ok {
r0 = rf(ctx, executionContext)
} else {
r0 = ret.Get(0).(handler.Transition)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, handler.NodeExecutionContext) error); ok {
r1 = rf(ctx, executionContext)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type Node_Setup struct {
*mock.Call
}
func (_m Node_Setup) Return(_a0 error) *Node_Setup {
return &Node_Setup{Call: _m.Call.Return(_a0)}
}
func (_m *Node) OnSetup(ctx context.Context, setupContext handler.SetupContext) *Node_Setup {
c := _m.On("Setup", ctx, setupContext)
return &Node_Setup{Call: c}
}
func (_m *Node) OnSetupMatch(matchers ...interface{}) *Node_Setup {
c := _m.On("Setup", matchers...)
return &Node_Setup{Call: c}
}
// Setup provides a mock function with given fields: ctx, setupContext
func (_m *Node) Setup(ctx context.Context, setupContext handler.SetupContext) error {
ret := _m.Called(ctx, setupContext)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, handler.SetupContext) error); ok {
r0 = rf(ctx, setupContext)
} else {
r0 = ret.Error(0)
}
return r0
}