-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmock_prophet.go
297 lines (251 loc) · 9.45 KB
/
mock_prophet.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
// Code generated by MockGen. DO NOT EDIT.
// Source: ./prophet.go
// Package prophet is a generated GoMock package.
package prophet
import (
gomock "github.com/golang/mock/gomock"
clientv3 "go.etcd.io/etcd/clientv3"
reflect "reflect"
time "time"
)
// MockRoleChangeHandler is a mock of RoleChangeHandler interface
type MockRoleChangeHandler struct {
ctrl *gomock.Controller
recorder *MockRoleChangeHandlerMockRecorder
}
// MockRoleChangeHandlerMockRecorder is the mock recorder for MockRoleChangeHandler
type MockRoleChangeHandlerMockRecorder struct {
mock *MockRoleChangeHandler
}
// NewMockRoleChangeHandler creates a new mock instance
func NewMockRoleChangeHandler(ctrl *gomock.Controller) *MockRoleChangeHandler {
mock := &MockRoleChangeHandler{ctrl: ctrl}
mock.recorder = &MockRoleChangeHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockRoleChangeHandler) EXPECT() *MockRoleChangeHandlerMockRecorder {
return m.recorder
}
// ProphetBecomeLeader mocks base method
func (m *MockRoleChangeHandler) ProphetBecomeLeader() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ProphetBecomeLeader")
}
// ProphetBecomeLeader indicates an expected call of ProphetBecomeLeader
func (mr *MockRoleChangeHandlerMockRecorder) ProphetBecomeLeader() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProphetBecomeLeader", reflect.TypeOf((*MockRoleChangeHandler)(nil).ProphetBecomeLeader))
}
// ProphetBecomeFollower mocks base method
func (m *MockRoleChangeHandler) ProphetBecomeFollower() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ProphetBecomeFollower")
}
// ProphetBecomeFollower indicates an expected call of ProphetBecomeFollower
func (mr *MockRoleChangeHandlerMockRecorder) ProphetBecomeFollower() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProphetBecomeFollower", reflect.TypeOf((*MockRoleChangeHandler)(nil).ProphetBecomeFollower))
}
// MockAdapter is a mock of Adapter interface
type MockAdapter struct {
ctrl *gomock.Controller
recorder *MockAdapterMockRecorder
}
// MockAdapterMockRecorder is the mock recorder for MockAdapter
type MockAdapterMockRecorder struct {
mock *MockAdapter
}
// NewMockAdapter creates a new mock instance
func NewMockAdapter(ctrl *gomock.Controller) *MockAdapter {
mock := &MockAdapter{ctrl: ctrl}
mock.recorder = &MockAdapterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockAdapter) EXPECT() *MockAdapterMockRecorder {
return m.recorder
}
// NewResource mocks base method
func (m *MockAdapter) NewResource() Resource {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewResource")
ret0, _ := ret[0].(Resource)
return ret0
}
// NewResource indicates an expected call of NewResource
func (mr *MockAdapterMockRecorder) NewResource() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewResource", reflect.TypeOf((*MockAdapter)(nil).NewResource))
}
// NewContainer mocks base method
func (m *MockAdapter) NewContainer() Container {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewContainer")
ret0, _ := ret[0].(Container)
return ret0
}
// NewContainer indicates an expected call of NewContainer
func (mr *MockAdapterMockRecorder) NewContainer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewContainer", reflect.TypeOf((*MockAdapter)(nil).NewContainer))
}
// FetchLeaderResources mocks base method
func (m *MockAdapter) FetchLeaderResources() []uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FetchLeaderResources")
ret0, _ := ret[0].([]uint64)
return ret0
}
// FetchLeaderResources indicates an expected call of FetchLeaderResources
func (mr *MockAdapterMockRecorder) FetchLeaderResources() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchLeaderResources", reflect.TypeOf((*MockAdapter)(nil).FetchLeaderResources))
}
// FetchResourceHB mocks base method
func (m *MockAdapter) FetchResourceHB(id uint64) *ResourceHeartbeatReq {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FetchResourceHB", id)
ret0, _ := ret[0].(*ResourceHeartbeatReq)
return ret0
}
// FetchResourceHB indicates an expected call of FetchResourceHB
func (mr *MockAdapterMockRecorder) FetchResourceHB(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchResourceHB", reflect.TypeOf((*MockAdapter)(nil).FetchResourceHB), id)
}
// FetchContainerHB mocks base method
func (m *MockAdapter) FetchContainerHB() *ContainerHeartbeatReq {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FetchContainerHB")
ret0, _ := ret[0].(*ContainerHeartbeatReq)
return ret0
}
// FetchContainerHB indicates an expected call of FetchContainerHB
func (mr *MockAdapterMockRecorder) FetchContainerHB() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchContainerHB", reflect.TypeOf((*MockAdapter)(nil).FetchContainerHB))
}
// ResourceHBInterval mocks base method
func (m *MockAdapter) ResourceHBInterval() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ResourceHBInterval")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// ResourceHBInterval indicates an expected call of ResourceHBInterval
func (mr *MockAdapterMockRecorder) ResourceHBInterval() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ResourceHBInterval", reflect.TypeOf((*MockAdapter)(nil).ResourceHBInterval))
}
// ContainerHBInterval mocks base method
func (m *MockAdapter) ContainerHBInterval() time.Duration {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ContainerHBInterval")
ret0, _ := ret[0].(time.Duration)
return ret0
}
// ContainerHBInterval indicates an expected call of ContainerHBInterval
func (mr *MockAdapterMockRecorder) ContainerHBInterval() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainerHBInterval", reflect.TypeOf((*MockAdapter)(nil).ContainerHBInterval))
}
// HBHandler mocks base method
func (m *MockAdapter) HBHandler() HeartbeatHandler {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HBHandler")
ret0, _ := ret[0].(HeartbeatHandler)
return ret0
}
// HBHandler indicates an expected call of HBHandler
func (mr *MockAdapterMockRecorder) HBHandler() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HBHandler", reflect.TypeOf((*MockAdapter)(nil).HBHandler))
}
// MockProphet is a mock of Prophet interface
type MockProphet struct {
ctrl *gomock.Controller
recorder *MockProphetMockRecorder
}
// MockProphetMockRecorder is the mock recorder for MockProphet
type MockProphetMockRecorder struct {
mock *MockProphet
}
// NewMockProphet creates a new mock instance
func NewMockProphet(ctrl *gomock.Controller) *MockProphet {
mock := &MockProphet{ctrl: ctrl}
mock.recorder = &MockProphetMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockProphet) EXPECT() *MockProphetMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockProphet) Start() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Start")
}
// Start indicates an expected call of Start
func (mr *MockProphetMockRecorder) Start() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockProphet)(nil).Start))
}
// Stop mocks base method
func (m *MockProphet) Stop() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Stop")
}
// Stop indicates an expected call of Stop
func (mr *MockProphetMockRecorder) Stop() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockProphet)(nil).Stop))
}
// GetStore mocks base method
func (m *MockProphet) GetStore() Store {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetStore")
ret0, _ := ret[0].(Store)
return ret0
}
// GetStore indicates an expected call of GetStore
func (mr *MockProphetMockRecorder) GetStore() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStore", reflect.TypeOf((*MockProphet)(nil).GetStore))
}
// GetRPC mocks base method
func (m *MockProphet) GetRPC() RPC {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRPC")
ret0, _ := ret[0].(RPC)
return ret0
}
// GetRPC indicates an expected call of GetRPC
func (mr *MockProphetMockRecorder) GetRPC() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRPC", reflect.TypeOf((*MockProphet)(nil).GetRPC))
}
// GetEtcdClient mocks base method
func (m *MockProphet) GetEtcdClient() *clientv3.Client {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetEtcdClient")
ret0, _ := ret[0].(*clientv3.Client)
return ret0
}
// GetEtcdClient indicates an expected call of GetEtcdClient
func (mr *MockProphetMockRecorder) GetEtcdClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEtcdClient", reflect.TypeOf((*MockProphet)(nil).GetEtcdClient))
}
// StorageNode mocks base method
func (m *MockProphet) StorageNode() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StorageNode")
ret0, _ := ret[0].(bool)
return ret0
}
// StorageNode indicates an expected call of StorageNode
func (mr *MockProphetMockRecorder) StorageNode() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageNode", reflect.TypeOf((*MockProphet)(nil).StorageNode))
}