-
Notifications
You must be signed in to change notification settings - Fork 134
/
api.go
422 lines (371 loc) · 15.8 KB
/
api.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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/armadaproject/armada/pkg/api (interfaces: SubmitClient,Submit_GetQueuesClient)
// Package schedulermocks is a generated GoMock package.
package schedulermocks
import (
context "context"
reflect "reflect"
api "github.com/armadaproject/armada/pkg/api"
types "github.com/gogo/protobuf/types"
gomock "github.com/golang/mock/gomock"
grpc "google.golang.org/grpc"
metadata "google.golang.org/grpc/metadata"
)
// MockSubmitClient is a mock of SubmitClient interface.
type MockSubmitClient struct {
ctrl *gomock.Controller
recorder *MockSubmitClientMockRecorder
}
// MockSubmitClientMockRecorder is the mock recorder for MockSubmitClient.
type MockSubmitClientMockRecorder struct {
mock *MockSubmitClient
}
// NewMockSubmitClient creates a new mock instance.
func NewMockSubmitClient(ctrl *gomock.Controller) *MockSubmitClient {
mock := &MockSubmitClient{ctrl: ctrl}
mock.recorder = &MockSubmitClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSubmitClient) EXPECT() *MockSubmitClientMockRecorder {
return m.recorder
}
// CancelJobSet mocks base method.
func (m *MockSubmitClient) CancelJobSet(arg0 context.Context, arg1 *api.JobSetCancelRequest, arg2 ...grpc.CallOption) (*types.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CancelJobSet", varargs...)
ret0, _ := ret[0].(*types.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CancelJobSet indicates an expected call of CancelJobSet.
func (mr *MockSubmitClientMockRecorder) CancelJobSet(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelJobSet", reflect.TypeOf((*MockSubmitClient)(nil).CancelJobSet), varargs...)
}
// CancelJobs mocks base method.
func (m *MockSubmitClient) CancelJobs(arg0 context.Context, arg1 *api.JobCancelRequest, arg2 ...grpc.CallOption) (*api.CancellationResult, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CancelJobs", varargs...)
ret0, _ := ret[0].(*api.CancellationResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CancelJobs indicates an expected call of CancelJobs.
func (mr *MockSubmitClientMockRecorder) CancelJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelJobs", reflect.TypeOf((*MockSubmitClient)(nil).CancelJobs), varargs...)
}
// CreateQueue mocks base method.
func (m *MockSubmitClient) CreateQueue(arg0 context.Context, arg1 *api.Queue, arg2 ...grpc.CallOption) (*types.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CreateQueue", varargs...)
ret0, _ := ret[0].(*types.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateQueue indicates an expected call of CreateQueue.
func (mr *MockSubmitClientMockRecorder) CreateQueue(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateQueue", reflect.TypeOf((*MockSubmitClient)(nil).CreateQueue), varargs...)
}
// CreateQueues mocks base method.
func (m *MockSubmitClient) CreateQueues(arg0 context.Context, arg1 *api.QueueList, arg2 ...grpc.CallOption) (*api.BatchQueueCreateResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "CreateQueues", varargs...)
ret0, _ := ret[0].(*api.BatchQueueCreateResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CreateQueues indicates an expected call of CreateQueues.
func (mr *MockSubmitClientMockRecorder) CreateQueues(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateQueues", reflect.TypeOf((*MockSubmitClient)(nil).CreateQueues), varargs...)
}
// DeleteQueue mocks base method.
func (m *MockSubmitClient) DeleteQueue(arg0 context.Context, arg1 *api.QueueDeleteRequest, arg2 ...grpc.CallOption) (*types.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DeleteQueue", varargs...)
ret0, _ := ret[0].(*types.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteQueue indicates an expected call of DeleteQueue.
func (mr *MockSubmitClientMockRecorder) DeleteQueue(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteQueue", reflect.TypeOf((*MockSubmitClient)(nil).DeleteQueue), varargs...)
}
// GetQueue mocks base method.
func (m *MockSubmitClient) GetQueue(arg0 context.Context, arg1 *api.QueueGetRequest, arg2 ...grpc.CallOption) (*api.Queue, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetQueue", varargs...)
ret0, _ := ret[0].(*api.Queue)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetQueue indicates an expected call of GetQueue.
func (mr *MockSubmitClientMockRecorder) GetQueue(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueue", reflect.TypeOf((*MockSubmitClient)(nil).GetQueue), varargs...)
}
// GetQueues mocks base method.
func (m *MockSubmitClient) GetQueues(arg0 context.Context, arg1 *api.StreamingQueueGetRequest, arg2 ...grpc.CallOption) (api.Submit_GetQueuesClient, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetQueues", varargs...)
ret0, _ := ret[0].(api.Submit_GetQueuesClient)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetQueues indicates an expected call of GetQueues.
func (mr *MockSubmitClientMockRecorder) GetQueues(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetQueues", reflect.TypeOf((*MockSubmitClient)(nil).GetQueues), varargs...)
}
// Health mocks base method.
func (m *MockSubmitClient) Health(arg0 context.Context, arg1 *types.Empty, arg2 ...grpc.CallOption) (*api.HealthCheckResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "Health", varargs...)
ret0, _ := ret[0].(*api.HealthCheckResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Health indicates an expected call of Health.
func (mr *MockSubmitClientMockRecorder) Health(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Health", reflect.TypeOf((*MockSubmitClient)(nil).Health), varargs...)
}
// PreemptJobs mocks base method.
func (m *MockSubmitClient) PreemptJobs(arg0 context.Context, arg1 *api.JobPreemptRequest, arg2 ...grpc.CallOption) (*types.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "PreemptJobs", varargs...)
ret0, _ := ret[0].(*types.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PreemptJobs indicates an expected call of PreemptJobs.
func (mr *MockSubmitClientMockRecorder) PreemptJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PreemptJobs", reflect.TypeOf((*MockSubmitClient)(nil).PreemptJobs), varargs...)
}
// ReprioritizeJobs mocks base method.
func (m *MockSubmitClient) ReprioritizeJobs(arg0 context.Context, arg1 *api.JobReprioritizeRequest, arg2 ...grpc.CallOption) (*api.JobReprioritizeResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "ReprioritizeJobs", varargs...)
ret0, _ := ret[0].(*api.JobReprioritizeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ReprioritizeJobs indicates an expected call of ReprioritizeJobs.
func (mr *MockSubmitClientMockRecorder) ReprioritizeJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReprioritizeJobs", reflect.TypeOf((*MockSubmitClient)(nil).ReprioritizeJobs), varargs...)
}
// SubmitJobs mocks base method.
func (m *MockSubmitClient) SubmitJobs(arg0 context.Context, arg1 *api.JobSubmitRequest, arg2 ...grpc.CallOption) (*api.JobSubmitResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SubmitJobs", varargs...)
ret0, _ := ret[0].(*api.JobSubmitResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SubmitJobs indicates an expected call of SubmitJobs.
func (mr *MockSubmitClientMockRecorder) SubmitJobs(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubmitJobs", reflect.TypeOf((*MockSubmitClient)(nil).SubmitJobs), varargs...)
}
// UpdateQueue mocks base method.
func (m *MockSubmitClient) UpdateQueue(arg0 context.Context, arg1 *api.Queue, arg2 ...grpc.CallOption) (*types.Empty, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpdateQueue", varargs...)
ret0, _ := ret[0].(*types.Empty)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateQueue indicates an expected call of UpdateQueue.
func (mr *MockSubmitClientMockRecorder) UpdateQueue(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateQueue", reflect.TypeOf((*MockSubmitClient)(nil).UpdateQueue), varargs...)
}
// UpdateQueues mocks base method.
func (m *MockSubmitClient) UpdateQueues(arg0 context.Context, arg1 *api.QueueList, arg2 ...grpc.CallOption) (*api.BatchQueueUpdateResponse, error) {
m.ctrl.T.Helper()
varargs := []interface{}{arg0, arg1}
for _, a := range arg2 {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpdateQueues", varargs...)
ret0, _ := ret[0].(*api.BatchQueueUpdateResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateQueues indicates an expected call of UpdateQueues.
func (mr *MockSubmitClientMockRecorder) UpdateQueues(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{arg0, arg1}, arg2...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateQueues", reflect.TypeOf((*MockSubmitClient)(nil).UpdateQueues), varargs...)
}
// MockSubmit_GetQueuesClient is a mock of Submit_GetQueuesClient interface.
type MockSubmit_GetQueuesClient struct {
ctrl *gomock.Controller
recorder *MockSubmit_GetQueuesClientMockRecorder
}
// MockSubmit_GetQueuesClientMockRecorder is the mock recorder for MockSubmit_GetQueuesClient.
type MockSubmit_GetQueuesClientMockRecorder struct {
mock *MockSubmit_GetQueuesClient
}
// NewMockSubmit_GetQueuesClient creates a new mock instance.
func NewMockSubmit_GetQueuesClient(ctrl *gomock.Controller) *MockSubmit_GetQueuesClient {
mock := &MockSubmit_GetQueuesClient{ctrl: ctrl}
mock.recorder = &MockSubmit_GetQueuesClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSubmit_GetQueuesClient) EXPECT() *MockSubmit_GetQueuesClientMockRecorder {
return m.recorder
}
// CloseSend mocks base method.
func (m *MockSubmit_GetQueuesClient) CloseSend() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CloseSend")
ret0, _ := ret[0].(error)
return ret0
}
// CloseSend indicates an expected call of CloseSend.
func (mr *MockSubmit_GetQueuesClientMockRecorder) CloseSend() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).CloseSend))
}
// Context mocks base method.
func (m *MockSubmit_GetQueuesClient) Context() context.Context {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Context")
ret0, _ := ret[0].(context.Context)
return ret0
}
// Context indicates an expected call of Context.
func (mr *MockSubmit_GetQueuesClientMockRecorder) Context() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).Context))
}
// Header mocks base method.
func (m *MockSubmit_GetQueuesClient) Header() (metadata.MD, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Header")
ret0, _ := ret[0].(metadata.MD)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Header indicates an expected call of Header.
func (mr *MockSubmit_GetQueuesClientMockRecorder) Header() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).Header))
}
// Recv mocks base method.
func (m *MockSubmit_GetQueuesClient) Recv() (*api.StreamingQueueMessage, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Recv")
ret0, _ := ret[0].(*api.StreamingQueueMessage)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Recv indicates an expected call of Recv.
func (mr *MockSubmit_GetQueuesClientMockRecorder) Recv() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).Recv))
}
// RecvMsg mocks base method.
func (m *MockSubmit_GetQueuesClient) RecvMsg(arg0 interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RecvMsg", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// RecvMsg indicates an expected call of RecvMsg.
func (mr *MockSubmit_GetQueuesClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).RecvMsg), arg0)
}
// SendMsg mocks base method.
func (m *MockSubmit_GetQueuesClient) SendMsg(arg0 interface{}) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SendMsg", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SendMsg indicates an expected call of SendMsg.
func (mr *MockSubmit_GetQueuesClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).SendMsg), arg0)
}
// Trailer mocks base method.
func (m *MockSubmit_GetQueuesClient) Trailer() metadata.MD {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Trailer")
ret0, _ := ret[0].(metadata.MD)
return ret0
}
// Trailer indicates an expected call of Trailer.
func (mr *MockSubmit_GetQueuesClientMockRecorder) Trailer() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockSubmit_GetQueuesClient)(nil).Trailer))
}