-
Notifications
You must be signed in to change notification settings - Fork 457
/
Copy pathtopology_mock.go
946 lines (805 loc) · 30.6 KB
/
topology_mock.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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/m3db/m3/src/dbnode/topology/types.go
// Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Package topology is a generated GoMock package.
package topology
import (
"reflect"
"github.com/m3db/m3/src/cluster/client"
"github.com/m3db/m3/src/cluster/services"
"github.com/m3db/m3/src/dbnode/sharding"
"github.com/m3db/m3x/ident"
"github.com/m3db/m3x/instrument"
"github.com/golang/mock/gomock"
)
// MockHost is a mock of Host interface
type MockHost struct {
ctrl *gomock.Controller
recorder *MockHostMockRecorder
}
// MockHostMockRecorder is the mock recorder for MockHost
type MockHostMockRecorder struct {
mock *MockHost
}
// NewMockHost creates a new mock instance
func NewMockHost(ctrl *gomock.Controller) *MockHost {
mock := &MockHost{ctrl: ctrl}
mock.recorder = &MockHostMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockHost) EXPECT() *MockHostMockRecorder {
return m.recorder
}
// ID mocks base method
func (m *MockHost) ID() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ID")
ret0, _ := ret[0].(string)
return ret0
}
// ID indicates an expected call of ID
func (mr *MockHostMockRecorder) ID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockHost)(nil).ID))
}
// Address mocks base method
func (m *MockHost) Address() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Address")
ret0, _ := ret[0].(string)
return ret0
}
// Address indicates an expected call of Address
func (mr *MockHostMockRecorder) Address() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockHost)(nil).Address))
}
// String mocks base method
func (m *MockHost) String() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "String")
ret0, _ := ret[0].(string)
return ret0
}
// String indicates an expected call of String
func (mr *MockHostMockRecorder) String() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockHost)(nil).String))
}
// MockHostShardSet is a mock of HostShardSet interface
type MockHostShardSet struct {
ctrl *gomock.Controller
recorder *MockHostShardSetMockRecorder
}
// MockHostShardSetMockRecorder is the mock recorder for MockHostShardSet
type MockHostShardSetMockRecorder struct {
mock *MockHostShardSet
}
// NewMockHostShardSet creates a new mock instance
func NewMockHostShardSet(ctrl *gomock.Controller) *MockHostShardSet {
mock := &MockHostShardSet{ctrl: ctrl}
mock.recorder = &MockHostShardSetMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockHostShardSet) EXPECT() *MockHostShardSetMockRecorder {
return m.recorder
}
// Host mocks base method
func (m *MockHostShardSet) Host() Host {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Host")
ret0, _ := ret[0].(Host)
return ret0
}
// Host indicates an expected call of Host
func (mr *MockHostShardSetMockRecorder) Host() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Host", reflect.TypeOf((*MockHostShardSet)(nil).Host))
}
// ShardSet mocks base method
func (m *MockHostShardSet) ShardSet() sharding.ShardSet {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShardSet")
ret0, _ := ret[0].(sharding.ShardSet)
return ret0
}
// ShardSet indicates an expected call of ShardSet
func (mr *MockHostShardSetMockRecorder) ShardSet() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardSet", reflect.TypeOf((*MockHostShardSet)(nil).ShardSet))
}
// MockInitializer is a mock of Initializer interface
type MockInitializer struct {
ctrl *gomock.Controller
recorder *MockInitializerMockRecorder
}
// MockInitializerMockRecorder is the mock recorder for MockInitializer
type MockInitializerMockRecorder struct {
mock *MockInitializer
}
// NewMockInitializer creates a new mock instance
func NewMockInitializer(ctrl *gomock.Controller) *MockInitializer {
mock := &MockInitializer{ctrl: ctrl}
mock.recorder = &MockInitializerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockInitializer) EXPECT() *MockInitializerMockRecorder {
return m.recorder
}
// Init mocks base method
func (m *MockInitializer) Init() (Topology, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Init")
ret0, _ := ret[0].(Topology)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Init indicates an expected call of Init
func (mr *MockInitializerMockRecorder) Init() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockInitializer)(nil).Init))
}
// MockTopology is a mock of Topology interface
type MockTopology struct {
ctrl *gomock.Controller
recorder *MockTopologyMockRecorder
}
// MockTopologyMockRecorder is the mock recorder for MockTopology
type MockTopologyMockRecorder struct {
mock *MockTopology
}
// NewMockTopology creates a new mock instance
func NewMockTopology(ctrl *gomock.Controller) *MockTopology {
mock := &MockTopology{ctrl: ctrl}
mock.recorder = &MockTopologyMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockTopology) EXPECT() *MockTopologyMockRecorder {
return m.recorder
}
// Get mocks base method
func (m *MockTopology) Get() Map {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(Map)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockTopologyMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTopology)(nil).Get))
}
// Watch mocks base method
func (m *MockTopology) Watch() (MapWatch, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Watch")
ret0, _ := ret[0].(MapWatch)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Watch indicates an expected call of Watch
func (mr *MockTopologyMockRecorder) Watch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockTopology)(nil).Watch))
}
// Close mocks base method
func (m *MockTopology) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockTopologyMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTopology)(nil).Close))
}
// MockDynamicTopology is a mock of DynamicTopology interface
type MockDynamicTopology struct {
ctrl *gomock.Controller
recorder *MockDynamicTopologyMockRecorder
}
// MockDynamicTopologyMockRecorder is the mock recorder for MockDynamicTopology
type MockDynamicTopologyMockRecorder struct {
mock *MockDynamicTopology
}
// NewMockDynamicTopology creates a new mock instance
func NewMockDynamicTopology(ctrl *gomock.Controller) *MockDynamicTopology {
mock := &MockDynamicTopology{ctrl: ctrl}
mock.recorder = &MockDynamicTopologyMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDynamicTopology) EXPECT() *MockDynamicTopologyMockRecorder {
return m.recorder
}
// Get mocks base method
func (m *MockDynamicTopology) Get() Map {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(Map)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockDynamicTopologyMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockDynamicTopology)(nil).Get))
}
// Watch mocks base method
func (m *MockDynamicTopology) Watch() (MapWatch, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Watch")
ret0, _ := ret[0].(MapWatch)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Watch indicates an expected call of Watch
func (mr *MockDynamicTopologyMockRecorder) Watch() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockDynamicTopology)(nil).Watch))
}
// Close mocks base method
func (m *MockDynamicTopology) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockDynamicTopologyMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDynamicTopology)(nil).Close))
}
// MarkShardsAvailable mocks base method
func (m *MockDynamicTopology) MarkShardsAvailable(instanceID string, shardIDs ...uint32) error {
m.ctrl.T.Helper()
varargs := []interface{}{instanceID}
for _, a := range shardIDs {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "MarkShardsAvailable", varargs...)
ret0, _ := ret[0].(error)
return ret0
}
// MarkShardsAvailable indicates an expected call of MarkShardsAvailable
func (mr *MockDynamicTopologyMockRecorder) MarkShardsAvailable(instanceID interface{}, shardIDs ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]interface{}{instanceID}, shardIDs...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkShardsAvailable", reflect.TypeOf((*MockDynamicTopology)(nil).MarkShardsAvailable), varargs...)
}
// MockMapWatch is a mock of MapWatch interface
type MockMapWatch struct {
ctrl *gomock.Controller
recorder *MockMapWatchMockRecorder
}
// MockMapWatchMockRecorder is the mock recorder for MockMapWatch
type MockMapWatchMockRecorder struct {
mock *MockMapWatch
}
// NewMockMapWatch creates a new mock instance
func NewMockMapWatch(ctrl *gomock.Controller) *MockMapWatch {
mock := &MockMapWatch{ctrl: ctrl}
mock.recorder = &MockMapWatchMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMapWatch) EXPECT() *MockMapWatchMockRecorder {
return m.recorder
}
// C mocks base method
func (m *MockMapWatch) C() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "C")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// C indicates an expected call of C
func (mr *MockMapWatchMockRecorder) C() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "C", reflect.TypeOf((*MockMapWatch)(nil).C))
}
// Get mocks base method
func (m *MockMapWatch) Get() Map {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get")
ret0, _ := ret[0].(Map)
return ret0
}
// Get indicates an expected call of Get
func (mr *MockMapWatchMockRecorder) Get() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockMapWatch)(nil).Get))
}
// Close mocks base method
func (m *MockMapWatch) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockMapWatchMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockMapWatch)(nil).Close))
}
// MockMap is a mock of Map interface
type MockMap struct {
ctrl *gomock.Controller
recorder *MockMapMockRecorder
}
// MockMapMockRecorder is the mock recorder for MockMap
type MockMapMockRecorder struct {
mock *MockMap
}
// NewMockMap creates a new mock instance
func NewMockMap(ctrl *gomock.Controller) *MockMap {
mock := &MockMap{ctrl: ctrl}
mock.recorder = &MockMapMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMap) EXPECT() *MockMapMockRecorder {
return m.recorder
}
// Hosts mocks base method
func (m *MockMap) Hosts() []Host {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Hosts")
ret0, _ := ret[0].([]Host)
return ret0
}
// Hosts indicates an expected call of Hosts
func (mr *MockMapMockRecorder) Hosts() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hosts", reflect.TypeOf((*MockMap)(nil).Hosts))
}
// HostShardSets mocks base method
func (m *MockMap) HostShardSets() []HostShardSet {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HostShardSets")
ret0, _ := ret[0].([]HostShardSet)
return ret0
}
// HostShardSets indicates an expected call of HostShardSets
func (mr *MockMapMockRecorder) HostShardSets() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostShardSets", reflect.TypeOf((*MockMap)(nil).HostShardSets))
}
// LookupHostShardSet mocks base method
func (m *MockMap) LookupHostShardSet(hostID string) (HostShardSet, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LookupHostShardSet", hostID)
ret0, _ := ret[0].(HostShardSet)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// LookupHostShardSet indicates an expected call of LookupHostShardSet
func (mr *MockMapMockRecorder) LookupHostShardSet(hostID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LookupHostShardSet", reflect.TypeOf((*MockMap)(nil).LookupHostShardSet), hostID)
}
// HostsLen mocks base method
func (m *MockMap) HostsLen() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HostsLen")
ret0, _ := ret[0].(int)
return ret0
}
// HostsLen indicates an expected call of HostsLen
func (mr *MockMapMockRecorder) HostsLen() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostsLen", reflect.TypeOf((*MockMap)(nil).HostsLen))
}
// ShardSet mocks base method
func (m *MockMap) ShardSet() sharding.ShardSet {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShardSet")
ret0, _ := ret[0].(sharding.ShardSet)
return ret0
}
// ShardSet indicates an expected call of ShardSet
func (mr *MockMapMockRecorder) ShardSet() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardSet", reflect.TypeOf((*MockMap)(nil).ShardSet))
}
// Route mocks base method
func (m *MockMap) Route(id ident.ID) (uint32, []Host, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Route", id)
ret0, _ := ret[0].(uint32)
ret1, _ := ret[1].([]Host)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Route indicates an expected call of Route
func (mr *MockMapMockRecorder) Route(id interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Route", reflect.TypeOf((*MockMap)(nil).Route), id)
}
// RouteForEach mocks base method
func (m *MockMap) RouteForEach(id ident.ID, forEachFn RouteForEachFn) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteForEach", id, forEachFn)
ret0, _ := ret[0].(error)
return ret0
}
// RouteForEach indicates an expected call of RouteForEach
func (mr *MockMapMockRecorder) RouteForEach(id, forEachFn interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteForEach", reflect.TypeOf((*MockMap)(nil).RouteForEach), id, forEachFn)
}
// RouteShard mocks base method
func (m *MockMap) RouteShard(shard uint32) ([]Host, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteShard", shard)
ret0, _ := ret[0].([]Host)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RouteShard indicates an expected call of RouteShard
func (mr *MockMapMockRecorder) RouteShard(shard interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteShard", reflect.TypeOf((*MockMap)(nil).RouteShard), shard)
}
// RouteShardForEach mocks base method
func (m *MockMap) RouteShardForEach(shard uint32, forEachFn RouteForEachFn) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RouteShardForEach", shard, forEachFn)
ret0, _ := ret[0].(error)
return ret0
}
// RouteShardForEach indicates an expected call of RouteShardForEach
func (mr *MockMapMockRecorder) RouteShardForEach(shard, forEachFn interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RouteShardForEach", reflect.TypeOf((*MockMap)(nil).RouteShardForEach), shard, forEachFn)
}
// Replicas mocks base method
func (m *MockMap) Replicas() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Replicas")
ret0, _ := ret[0].(int)
return ret0
}
// Replicas indicates an expected call of Replicas
func (mr *MockMapMockRecorder) Replicas() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Replicas", reflect.TypeOf((*MockMap)(nil).Replicas))
}
// MajorityReplicas mocks base method
func (m *MockMap) MajorityReplicas() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MajorityReplicas")
ret0, _ := ret[0].(int)
return ret0
}
// MajorityReplicas indicates an expected call of MajorityReplicas
func (mr *MockMapMockRecorder) MajorityReplicas() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MajorityReplicas", reflect.TypeOf((*MockMap)(nil).MajorityReplicas))
}
// MockStaticOptions is a mock of StaticOptions interface
type MockStaticOptions struct {
ctrl *gomock.Controller
recorder *MockStaticOptionsMockRecorder
}
// MockStaticOptionsMockRecorder is the mock recorder for MockStaticOptions
type MockStaticOptionsMockRecorder struct {
mock *MockStaticOptions
}
// NewMockStaticOptions creates a new mock instance
func NewMockStaticOptions(ctrl *gomock.Controller) *MockStaticOptions {
mock := &MockStaticOptions{ctrl: ctrl}
mock.recorder = &MockStaticOptionsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockStaticOptions) EXPECT() *MockStaticOptionsMockRecorder {
return m.recorder
}
// Validate mocks base method
func (m *MockStaticOptions) Validate() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Validate")
ret0, _ := ret[0].(error)
return ret0
}
// Validate indicates an expected call of Validate
func (mr *MockStaticOptionsMockRecorder) Validate() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockStaticOptions)(nil).Validate))
}
// SetShardSet mocks base method
func (m *MockStaticOptions) SetShardSet(value sharding.ShardSet) StaticOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetShardSet", value)
ret0, _ := ret[0].(StaticOptions)
return ret0
}
// SetShardSet indicates an expected call of SetShardSet
func (mr *MockStaticOptionsMockRecorder) SetShardSet(value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShardSet", reflect.TypeOf((*MockStaticOptions)(nil).SetShardSet), value)
}
// ShardSet mocks base method
func (m *MockStaticOptions) ShardSet() sharding.ShardSet {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ShardSet")
ret0, _ := ret[0].(sharding.ShardSet)
return ret0
}
// ShardSet indicates an expected call of ShardSet
func (mr *MockStaticOptionsMockRecorder) ShardSet() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardSet", reflect.TypeOf((*MockStaticOptions)(nil).ShardSet))
}
// SetReplicas mocks base method
func (m *MockStaticOptions) SetReplicas(value int) StaticOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetReplicas", value)
ret0, _ := ret[0].(StaticOptions)
return ret0
}
// SetReplicas indicates an expected call of SetReplicas
func (mr *MockStaticOptionsMockRecorder) SetReplicas(value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReplicas", reflect.TypeOf((*MockStaticOptions)(nil).SetReplicas), value)
}
// Replicas mocks base method
func (m *MockStaticOptions) Replicas() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Replicas")
ret0, _ := ret[0].(int)
return ret0
}
// Replicas indicates an expected call of Replicas
func (mr *MockStaticOptionsMockRecorder) Replicas() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Replicas", reflect.TypeOf((*MockStaticOptions)(nil).Replicas))
}
// SetHostShardSets mocks base method
func (m *MockStaticOptions) SetHostShardSets(value []HostShardSet) StaticOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHostShardSets", value)
ret0, _ := ret[0].(StaticOptions)
return ret0
}
// SetHostShardSets indicates an expected call of SetHostShardSets
func (mr *MockStaticOptionsMockRecorder) SetHostShardSets(value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostShardSets", reflect.TypeOf((*MockStaticOptions)(nil).SetHostShardSets), value)
}
// HostShardSets mocks base method
func (m *MockStaticOptions) HostShardSets() []HostShardSet {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HostShardSets")
ret0, _ := ret[0].([]HostShardSet)
return ret0
}
// HostShardSets indicates an expected call of HostShardSets
func (mr *MockStaticOptionsMockRecorder) HostShardSets() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HostShardSets", reflect.TypeOf((*MockStaticOptions)(nil).HostShardSets))
}
// MockDynamicOptions is a mock of DynamicOptions interface
type MockDynamicOptions struct {
ctrl *gomock.Controller
recorder *MockDynamicOptionsMockRecorder
}
// MockDynamicOptionsMockRecorder is the mock recorder for MockDynamicOptions
type MockDynamicOptionsMockRecorder struct {
mock *MockDynamicOptions
}
// NewMockDynamicOptions creates a new mock instance
func NewMockDynamicOptions(ctrl *gomock.Controller) *MockDynamicOptions {
mock := &MockDynamicOptions{ctrl: ctrl}
mock.recorder = &MockDynamicOptionsMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDynamicOptions) EXPECT() *MockDynamicOptionsMockRecorder {
return m.recorder
}
// Validate mocks base method
func (m *MockDynamicOptions) Validate() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Validate")
ret0, _ := ret[0].(error)
return ret0
}
// Validate indicates an expected call of Validate
func (mr *MockDynamicOptionsMockRecorder) Validate() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Validate", reflect.TypeOf((*MockDynamicOptions)(nil).Validate))
}
// SetConfigServiceClient mocks base method
func (m *MockDynamicOptions) SetConfigServiceClient(c client.Client) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetConfigServiceClient", c)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetConfigServiceClient indicates an expected call of SetConfigServiceClient
func (mr *MockDynamicOptionsMockRecorder) SetConfigServiceClient(c interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetConfigServiceClient", reflect.TypeOf((*MockDynamicOptions)(nil).SetConfigServiceClient), c)
}
// ConfigServiceClient mocks base method
func (m *MockDynamicOptions) ConfigServiceClient() client.Client {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ConfigServiceClient")
ret0, _ := ret[0].(client.Client)
return ret0
}
// ConfigServiceClient indicates an expected call of ConfigServiceClient
func (mr *MockDynamicOptionsMockRecorder) ConfigServiceClient() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigServiceClient", reflect.TypeOf((*MockDynamicOptions)(nil).ConfigServiceClient))
}
// SetServiceID mocks base method
func (m *MockDynamicOptions) SetServiceID(s services.ServiceID) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetServiceID", s)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetServiceID indicates an expected call of SetServiceID
func (mr *MockDynamicOptionsMockRecorder) SetServiceID(s interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetServiceID", reflect.TypeOf((*MockDynamicOptions)(nil).SetServiceID), s)
}
// ServiceID mocks base method
func (m *MockDynamicOptions) ServiceID() services.ServiceID {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServiceID")
ret0, _ := ret[0].(services.ServiceID)
return ret0
}
// ServiceID indicates an expected call of ServiceID
func (mr *MockDynamicOptionsMockRecorder) ServiceID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServiceID", reflect.TypeOf((*MockDynamicOptions)(nil).ServiceID))
}
// SetServicesOverrideOptions mocks base method
func (m *MockDynamicOptions) SetServicesOverrideOptions(opts services.OverrideOptions) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetServicesOverrideOptions", opts)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetServicesOverrideOptions indicates an expected call of SetServicesOverrideOptions
func (mr *MockDynamicOptionsMockRecorder) SetServicesOverrideOptions(opts interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetServicesOverrideOptions", reflect.TypeOf((*MockDynamicOptions)(nil).SetServicesOverrideOptions), opts)
}
// ServicesOverrideOptions mocks base method
func (m *MockDynamicOptions) ServicesOverrideOptions() services.OverrideOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ServicesOverrideOptions")
ret0, _ := ret[0].(services.OverrideOptions)
return ret0
}
// ServicesOverrideOptions indicates an expected call of ServicesOverrideOptions
func (mr *MockDynamicOptionsMockRecorder) ServicesOverrideOptions() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServicesOverrideOptions", reflect.TypeOf((*MockDynamicOptions)(nil).ServicesOverrideOptions))
}
// SetQueryOptions mocks base method
func (m *MockDynamicOptions) SetQueryOptions(value services.QueryOptions) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetQueryOptions", value)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetQueryOptions indicates an expected call of SetQueryOptions
func (mr *MockDynamicOptionsMockRecorder) SetQueryOptions(value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetQueryOptions", reflect.TypeOf((*MockDynamicOptions)(nil).SetQueryOptions), value)
}
// QueryOptions mocks base method
func (m *MockDynamicOptions) QueryOptions() services.QueryOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "QueryOptions")
ret0, _ := ret[0].(services.QueryOptions)
return ret0
}
// QueryOptions indicates an expected call of QueryOptions
func (mr *MockDynamicOptionsMockRecorder) QueryOptions() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryOptions", reflect.TypeOf((*MockDynamicOptions)(nil).QueryOptions))
}
// SetInstrumentOptions mocks base method
func (m *MockDynamicOptions) SetInstrumentOptions(value instrument.Options) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetInstrumentOptions", value)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetInstrumentOptions indicates an expected call of SetInstrumentOptions
func (mr *MockDynamicOptionsMockRecorder) SetInstrumentOptions(value interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstrumentOptions", reflect.TypeOf((*MockDynamicOptions)(nil).SetInstrumentOptions), value)
}
// InstrumentOptions mocks base method
func (m *MockDynamicOptions) InstrumentOptions() instrument.Options {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "InstrumentOptions")
ret0, _ := ret[0].(instrument.Options)
return ret0
}
// InstrumentOptions indicates an expected call of InstrumentOptions
func (mr *MockDynamicOptionsMockRecorder) InstrumentOptions() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstrumentOptions", reflect.TypeOf((*MockDynamicOptions)(nil).InstrumentOptions))
}
// SetHashGen mocks base method
func (m *MockDynamicOptions) SetHashGen(h sharding.HashGen) DynamicOptions {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetHashGen", h)
ret0, _ := ret[0].(DynamicOptions)
return ret0
}
// SetHashGen indicates an expected call of SetHashGen
func (mr *MockDynamicOptionsMockRecorder) SetHashGen(h interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHashGen", reflect.TypeOf((*MockDynamicOptions)(nil).SetHashGen), h)
}
// HashGen mocks base method
func (m *MockDynamicOptions) HashGen() sharding.HashGen {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HashGen")
ret0, _ := ret[0].(sharding.HashGen)
return ret0
}
// HashGen indicates an expected call of HashGen
func (mr *MockDynamicOptionsMockRecorder) HashGen() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HashGen", reflect.TypeOf((*MockDynamicOptions)(nil).HashGen))
}
// MockMapProvider is a mock of MapProvider interface
type MockMapProvider struct {
ctrl *gomock.Controller
recorder *MockMapProviderMockRecorder
}
// MockMapProviderMockRecorder is the mock recorder for MockMapProvider
type MockMapProviderMockRecorder struct {
mock *MockMapProvider
}
// NewMockMapProvider creates a new mock instance
func NewMockMapProvider(ctrl *gomock.Controller) *MockMapProvider {
mock := &MockMapProvider{ctrl: ctrl}
mock.recorder = &MockMapProviderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockMapProvider) EXPECT() *MockMapProviderMockRecorder {
return m.recorder
}
// TopologyMap mocks base method
func (m *MockMapProvider) TopologyMap() (Map, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TopologyMap")
ret0, _ := ret[0].(Map)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TopologyMap indicates an expected call of TopologyMap
func (mr *MockMapProviderMockRecorder) TopologyMap() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TopologyMap", reflect.TypeOf((*MockMapProvider)(nil).TopologyMap))
}