-
Notifications
You must be signed in to change notification settings - Fork 351
/
meta_range.go
414 lines (351 loc) · 13.8 KB
/
meta_range.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
// Code generated by MockGen. DO NOT EDIT.
// Source: meta_range.go
// Package mock is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
graveler "github.com/treeverse/lakefs/pkg/graveler"
committed "github.com/treeverse/lakefs/pkg/graveler/committed"
)
// MockIterator is a mock of Iterator interface.
type MockIterator struct {
ctrl *gomock.Controller
recorder *MockIteratorMockRecorder
}
// MockIteratorMockRecorder is the mock recorder for MockIterator.
type MockIteratorMockRecorder struct {
mock *MockIterator
}
// NewMockIterator creates a new mock instance.
func NewMockIterator(ctrl *gomock.Controller) *MockIterator {
mock := &MockIterator{ctrl: ctrl}
mock.recorder = &MockIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIterator) EXPECT() *MockIteratorMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockIterator) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close.
func (mr *MockIteratorMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockIterator)(nil).Close))
}
// Err mocks base method.
func (m *MockIterator) Err() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Err")
ret0, _ := ret[0].(error)
return ret0
}
// Err indicates an expected call of Err.
func (mr *MockIteratorMockRecorder) Err() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockIterator)(nil).Err))
}
// Next mocks base method.
func (m *MockIterator) Next() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next")
ret0, _ := ret[0].(bool)
return ret0
}
// Next indicates an expected call of Next.
func (mr *MockIteratorMockRecorder) Next() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next))
}
// NextRange mocks base method.
func (m *MockIterator) NextRange() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextRange")
ret0, _ := ret[0].(bool)
return ret0
}
// NextRange indicates an expected call of NextRange.
func (mr *MockIteratorMockRecorder) NextRange() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextRange", reflect.TypeOf((*MockIterator)(nil).NextRange))
}
// SeekGE mocks base method.
func (m *MockIterator) SeekGE(id graveler.Key) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SeekGE", id)
}
// SeekGE indicates an expected call of SeekGE.
func (mr *MockIteratorMockRecorder) SeekGE(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SeekGE", reflect.TypeOf((*MockIterator)(nil).SeekGE), id)
}
// Value mocks base method.
func (m *MockIterator) Value() (*graveler.ValueRecord, *committed.Range) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Value")
ret0, _ := ret[0].(*graveler.ValueRecord)
ret1, _ := ret[1].(*committed.Range)
return ret0, ret1
}
// Value indicates an expected call of Value.
func (mr *MockIteratorMockRecorder) Value() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockIterator)(nil).Value))
}
// MockDiffIterator is a mock of DiffIterator interface.
type MockDiffIterator struct {
ctrl *gomock.Controller
recorder *MockDiffIteratorMockRecorder
}
// MockDiffIteratorMockRecorder is the mock recorder for MockDiffIterator.
type MockDiffIteratorMockRecorder struct {
mock *MockDiffIterator
}
// NewMockDiffIterator creates a new mock instance.
func NewMockDiffIterator(ctrl *gomock.Controller) *MockDiffIterator {
mock := &MockDiffIterator{ctrl: ctrl}
mock.recorder = &MockDiffIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDiffIterator) EXPECT() *MockDiffIteratorMockRecorder {
return m.recorder
}
// Close mocks base method.
func (m *MockDiffIterator) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close.
func (mr *MockDiffIteratorMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDiffIterator)(nil).Close))
}
// Err mocks base method.
func (m *MockDiffIterator) Err() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Err")
ret0, _ := ret[0].(error)
return ret0
}
// Err indicates an expected call of Err.
func (mr *MockDiffIteratorMockRecorder) Err() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockDiffIterator)(nil).Err))
}
// Next mocks base method.
func (m *MockDiffIterator) Next() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next")
ret0, _ := ret[0].(bool)
return ret0
}
// Next indicates an expected call of Next.
func (mr *MockDiffIteratorMockRecorder) Next() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockDiffIterator)(nil).Next))
}
// NextRange mocks base method.
func (m *MockDiffIterator) NextRange() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NextRange")
ret0, _ := ret[0].(bool)
return ret0
}
// NextRange indicates an expected call of NextRange.
func (mr *MockDiffIteratorMockRecorder) NextRange() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NextRange", reflect.TypeOf((*MockDiffIterator)(nil).NextRange))
}
// SeekGE mocks base method.
func (m *MockDiffIterator) SeekGE(id graveler.Key) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SeekGE", id)
}
// SeekGE indicates an expected call of SeekGE.
func (mr *MockDiffIteratorMockRecorder) SeekGE(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SeekGE", reflect.TypeOf((*MockDiffIterator)(nil).SeekGE), id)
}
// Value mocks base method.
func (m *MockDiffIterator) Value() (*graveler.Diff, *committed.RangeDiff) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Value")
ret0, _ := ret[0].(*graveler.Diff)
ret1, _ := ret[1].(*committed.RangeDiff)
return ret0, ret1
}
// Value indicates an expected call of Value.
func (mr *MockDiffIteratorMockRecorder) Value() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockDiffIterator)(nil).Value))
}
// MockMetaRangeManager is a mock of MetaRangeManager interface.
type MockMetaRangeManager struct {
ctrl *gomock.Controller
recorder *MockMetaRangeManagerMockRecorder
}
// MockMetaRangeManagerMockRecorder is the mock recorder for MockMetaRangeManager.
type MockMetaRangeManagerMockRecorder struct {
mock *MockMetaRangeManager
}
// NewMockMetaRangeManager creates a new mock instance.
func NewMockMetaRangeManager(ctrl *gomock.Controller) *MockMetaRangeManager {
mock := &MockMetaRangeManager{ctrl: ctrl}
mock.recorder = &MockMetaRangeManagerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMetaRangeManager) EXPECT() *MockMetaRangeManagerMockRecorder {
return m.recorder
}
// Exists mocks base method.
func (m *MockMetaRangeManager) Exists(ctx context.Context, ns graveler.StorageNamespace, id graveler.MetaRangeID) (bool, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Exists", ctx, ns, id)
ret0, _ := ret[0].(bool)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Exists indicates an expected call of Exists.
func (mr *MockMetaRangeManagerMockRecorder) Exists(ctx, ns, id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Exists", reflect.TypeOf((*MockMetaRangeManager)(nil).Exists), ctx, ns, id)
}
// GetMetaRangeURI mocks base method.
func (m *MockMetaRangeManager) GetMetaRangeURI(ctx context.Context, ns graveler.StorageNamespace, metaRangeID graveler.MetaRangeID) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetMetaRangeURI", ctx, ns, metaRangeID)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetMetaRangeURI indicates an expected call of GetMetaRangeURI.
func (mr *MockMetaRangeManagerMockRecorder) GetMetaRangeURI(ctx, ns, metaRangeID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetaRangeURI", reflect.TypeOf((*MockMetaRangeManager)(nil).GetMetaRangeURI), ctx, ns, metaRangeID)
}
// GetRangeURI mocks base method.
func (m *MockMetaRangeManager) GetRangeURI(ctx context.Context, ns graveler.StorageNamespace, rangeID graveler.RangeID) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetRangeURI", ctx, ns, rangeID)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetRangeURI indicates an expected call of GetRangeURI.
func (mr *MockMetaRangeManagerMockRecorder) GetRangeURI(ctx, ns, rangeID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRangeURI", reflect.TypeOf((*MockMetaRangeManager)(nil).GetRangeURI), ctx, ns, rangeID)
}
// GetValue mocks base method.
func (m *MockMetaRangeManager) GetValue(ctx context.Context, ns graveler.StorageNamespace, id graveler.MetaRangeID, key graveler.Key) (*graveler.ValueRecord, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetValue", ctx, ns, id, key)
ret0, _ := ret[0].(*graveler.ValueRecord)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetValue indicates an expected call of GetValue.
func (mr *MockMetaRangeManagerMockRecorder) GetValue(ctx, ns, id, key interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValue", reflect.TypeOf((*MockMetaRangeManager)(nil).GetValue), ctx, ns, id, key)
}
// NewMetaRangeIterator mocks base method.
func (m *MockMetaRangeManager) NewMetaRangeIterator(ctx context.Context, ns graveler.StorageNamespace, metaRangeID graveler.MetaRangeID) (committed.Iterator, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewMetaRangeIterator", ctx, ns, metaRangeID)
ret0, _ := ret[0].(committed.Iterator)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NewMetaRangeIterator indicates an expected call of NewMetaRangeIterator.
func (mr *MockMetaRangeManagerMockRecorder) NewMetaRangeIterator(ctx, ns, metaRangeID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewMetaRangeIterator", reflect.TypeOf((*MockMetaRangeManager)(nil).NewMetaRangeIterator), ctx, ns, metaRangeID)
}
// NewWriter mocks base method.
func (m *MockMetaRangeManager) NewWriter(ctx context.Context, ns graveler.StorageNamespace, metadata graveler.Metadata) committed.MetaRangeWriter {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NewWriter", ctx, ns, metadata)
ret0, _ := ret[0].(committed.MetaRangeWriter)
return ret0
}
// NewWriter indicates an expected call of NewWriter.
func (mr *MockMetaRangeManagerMockRecorder) NewWriter(ctx, ns, metadata interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewWriter", reflect.TypeOf((*MockMetaRangeManager)(nil).NewWriter), ctx, ns, metadata)
}
// MockMetaRangeWriter is a mock of MetaRangeWriter interface.
type MockMetaRangeWriter struct {
ctrl *gomock.Controller
recorder *MockMetaRangeWriterMockRecorder
}
// MockMetaRangeWriterMockRecorder is the mock recorder for MockMetaRangeWriter.
type MockMetaRangeWriterMockRecorder struct {
mock *MockMetaRangeWriter
}
// NewMockMetaRangeWriter creates a new mock instance.
func NewMockMetaRangeWriter(ctrl *gomock.Controller) *MockMetaRangeWriter {
mock := &MockMetaRangeWriter{ctrl: ctrl}
mock.recorder = &MockMetaRangeWriterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMetaRangeWriter) EXPECT() *MockMetaRangeWriterMockRecorder {
return m.recorder
}
// Abort mocks base method.
func (m *MockMetaRangeWriter) Abort() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Abort")
ret0, _ := ret[0].(error)
return ret0
}
// Abort indicates an expected call of Abort.
func (mr *MockMetaRangeWriterMockRecorder) Abort() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Abort", reflect.TypeOf((*MockMetaRangeWriter)(nil).Abort))
}
// Close mocks base method.
func (m *MockMetaRangeWriter) Close() (*graveler.MetaRangeID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Close")
ret0, _ := ret[0].(*graveler.MetaRangeID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Close indicates an expected call of Close.
func (mr *MockMetaRangeWriterMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMetaRangeWriter)(nil).Close))
}
// WriteRange mocks base method.
func (m *MockMetaRangeWriter) WriteRange(arg0 committed.Range) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteRange", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// WriteRange indicates an expected call of WriteRange.
func (mr *MockMetaRangeWriterMockRecorder) WriteRange(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteRange", reflect.TypeOf((*MockMetaRangeWriter)(nil).WriteRange), arg0)
}
// WriteRecord mocks base method.
func (m *MockMetaRangeWriter) WriteRecord(arg0 graveler.ValueRecord) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "WriteRecord", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// WriteRecord indicates an expected call of WriteRecord.
func (mr *MockMetaRangeWriterMockRecorder) WriteRecord(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteRecord", reflect.TypeOf((*MockMetaRangeWriter)(nil).WriteRecord), arg0)
}