github.com/m3db/m3@v1.5.0/src/cluster/placement/placement_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/m3db/m3/src/cluster/placement/types.go 3 4 // Copyright (c) 2021 Uber Technologies, Inc. 5 // 6 // Permission is hereby granted, free of charge, to any person obtaining a copy 7 // of this software and associated documentation files (the "Software"), to deal 8 // in the Software without restriction, including without limitation the rights 9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 // copies of the Software, and to permit persons to whom the Software is 11 // furnished to do so, subject to the following conditions: 12 // 13 // The above copyright notice and this permission notice shall be included in 14 // all copies or substantial portions of the Software. 15 // 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 // THE SOFTWARE. 23 24 // Package placement is a generated GoMock package. 25 package placement 26 27 import ( 28 "reflect" 29 "time" 30 31 "github.com/m3db/m3/src/cluster/generated/proto/placementpb" 32 "github.com/m3db/m3/src/cluster/kv" 33 "github.com/m3db/m3/src/cluster/shard" 34 "github.com/m3db/m3/src/x/clock" 35 "github.com/m3db/m3/src/x/instrument" 36 37 "github.com/golang/mock/gomock" 38 "github.com/golang/protobuf/proto" 39 ) 40 41 // MockInstance is a mock of Instance interface. 42 type MockInstance struct { 43 ctrl *gomock.Controller 44 recorder *MockInstanceMockRecorder 45 } 46 47 // MockInstanceMockRecorder is the mock recorder for MockInstance. 48 type MockInstanceMockRecorder struct { 49 mock *MockInstance 50 } 51 52 // NewMockInstance creates a new mock instance. 53 func NewMockInstance(ctrl *gomock.Controller) *MockInstance { 54 mock := &MockInstance{ctrl: ctrl} 55 mock.recorder = &MockInstanceMockRecorder{mock} 56 return mock 57 } 58 59 // EXPECT returns an object that allows the caller to indicate expected use. 60 func (m *MockInstance) EXPECT() *MockInstanceMockRecorder { 61 return m.recorder 62 } 63 64 // Clone mocks base method. 65 func (m *MockInstance) Clone() Instance { 66 m.ctrl.T.Helper() 67 ret := m.ctrl.Call(m, "Clone") 68 ret0, _ := ret[0].(Instance) 69 return ret0 70 } 71 72 // Clone indicates an expected call of Clone. 73 func (mr *MockInstanceMockRecorder) Clone() *gomock.Call { 74 mr.mock.ctrl.T.Helper() 75 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockInstance)(nil).Clone)) 76 } 77 78 // Endpoint mocks base method. 79 func (m *MockInstance) Endpoint() string { 80 m.ctrl.T.Helper() 81 ret := m.ctrl.Call(m, "Endpoint") 82 ret0, _ := ret[0].(string) 83 return ret0 84 } 85 86 // Endpoint indicates an expected call of Endpoint. 87 func (mr *MockInstanceMockRecorder) Endpoint() *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Endpoint", reflect.TypeOf((*MockInstance)(nil).Endpoint)) 90 } 91 92 // Hostname mocks base method. 93 func (m *MockInstance) Hostname() string { 94 m.ctrl.T.Helper() 95 ret := m.ctrl.Call(m, "Hostname") 96 ret0, _ := ret[0].(string) 97 return ret0 98 } 99 100 // Hostname indicates an expected call of Hostname. 101 func (mr *MockInstanceMockRecorder) Hostname() *gomock.Call { 102 mr.mock.ctrl.T.Helper() 103 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hostname", reflect.TypeOf((*MockInstance)(nil).Hostname)) 104 } 105 106 // ID mocks base method. 107 func (m *MockInstance) ID() string { 108 m.ctrl.T.Helper() 109 ret := m.ctrl.Call(m, "ID") 110 ret0, _ := ret[0].(string) 111 return ret0 112 } 113 114 // ID indicates an expected call of ID. 115 func (mr *MockInstanceMockRecorder) ID() *gomock.Call { 116 mr.mock.ctrl.T.Helper() 117 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockInstance)(nil).ID)) 118 } 119 120 // IsAvailable mocks base method. 121 func (m *MockInstance) IsAvailable() bool { 122 m.ctrl.T.Helper() 123 ret := m.ctrl.Call(m, "IsAvailable") 124 ret0, _ := ret[0].(bool) 125 return ret0 126 } 127 128 // IsAvailable indicates an expected call of IsAvailable. 129 func (mr *MockInstanceMockRecorder) IsAvailable() *gomock.Call { 130 mr.mock.ctrl.T.Helper() 131 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAvailable", reflect.TypeOf((*MockInstance)(nil).IsAvailable)) 132 } 133 134 // IsInitializing mocks base method. 135 func (m *MockInstance) IsInitializing() bool { 136 m.ctrl.T.Helper() 137 ret := m.ctrl.Call(m, "IsInitializing") 138 ret0, _ := ret[0].(bool) 139 return ret0 140 } 141 142 // IsInitializing indicates an expected call of IsInitializing. 143 func (mr *MockInstanceMockRecorder) IsInitializing() *gomock.Call { 144 mr.mock.ctrl.T.Helper() 145 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitializing", reflect.TypeOf((*MockInstance)(nil).IsInitializing)) 146 } 147 148 // IsLeaving mocks base method. 149 func (m *MockInstance) IsLeaving() bool { 150 m.ctrl.T.Helper() 151 ret := m.ctrl.Call(m, "IsLeaving") 152 ret0, _ := ret[0].(bool) 153 return ret0 154 } 155 156 // IsLeaving indicates an expected call of IsLeaving. 157 func (mr *MockInstanceMockRecorder) IsLeaving() *gomock.Call { 158 mr.mock.ctrl.T.Helper() 159 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeaving", reflect.TypeOf((*MockInstance)(nil).IsLeaving)) 160 } 161 162 // IsolationGroup mocks base method. 163 func (m *MockInstance) IsolationGroup() string { 164 m.ctrl.T.Helper() 165 ret := m.ctrl.Call(m, "IsolationGroup") 166 ret0, _ := ret[0].(string) 167 return ret0 168 } 169 170 // IsolationGroup indicates an expected call of IsolationGroup. 171 func (mr *MockInstanceMockRecorder) IsolationGroup() *gomock.Call { 172 mr.mock.ctrl.T.Helper() 173 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsolationGroup", reflect.TypeOf((*MockInstance)(nil).IsolationGroup)) 174 } 175 176 // Metadata mocks base method. 177 func (m *MockInstance) Metadata() InstanceMetadata { 178 m.ctrl.T.Helper() 179 ret := m.ctrl.Call(m, "Metadata") 180 ret0, _ := ret[0].(InstanceMetadata) 181 return ret0 182 } 183 184 // Metadata indicates an expected call of Metadata. 185 func (mr *MockInstanceMockRecorder) Metadata() *gomock.Call { 186 mr.mock.ctrl.T.Helper() 187 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Metadata", reflect.TypeOf((*MockInstance)(nil).Metadata)) 188 } 189 190 // Port mocks base method. 191 func (m *MockInstance) Port() uint32 { 192 m.ctrl.T.Helper() 193 ret := m.ctrl.Call(m, "Port") 194 ret0, _ := ret[0].(uint32) 195 return ret0 196 } 197 198 // Port indicates an expected call of Port. 199 func (mr *MockInstanceMockRecorder) Port() *gomock.Call { 200 mr.mock.ctrl.T.Helper() 201 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Port", reflect.TypeOf((*MockInstance)(nil).Port)) 202 } 203 204 // Proto mocks base method. 205 func (m *MockInstance) Proto() (*placementpb.Instance, error) { 206 m.ctrl.T.Helper() 207 ret := m.ctrl.Call(m, "Proto") 208 ret0, _ := ret[0].(*placementpb.Instance) 209 ret1, _ := ret[1].(error) 210 return ret0, ret1 211 } 212 213 // Proto indicates an expected call of Proto. 214 func (mr *MockInstanceMockRecorder) Proto() *gomock.Call { 215 mr.mock.ctrl.T.Helper() 216 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proto", reflect.TypeOf((*MockInstance)(nil).Proto)) 217 } 218 219 // SetEndpoint mocks base method. 220 func (m *MockInstance) SetEndpoint(ip string) Instance { 221 m.ctrl.T.Helper() 222 ret := m.ctrl.Call(m, "SetEndpoint", ip) 223 ret0, _ := ret[0].(Instance) 224 return ret0 225 } 226 227 // SetEndpoint indicates an expected call of SetEndpoint. 228 func (mr *MockInstanceMockRecorder) SetEndpoint(ip interface{}) *gomock.Call { 229 mr.mock.ctrl.T.Helper() 230 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetEndpoint", reflect.TypeOf((*MockInstance)(nil).SetEndpoint), ip) 231 } 232 233 // SetHostname mocks base method. 234 func (m *MockInstance) SetHostname(value string) Instance { 235 m.ctrl.T.Helper() 236 ret := m.ctrl.Call(m, "SetHostname", value) 237 ret0, _ := ret[0].(Instance) 238 return ret0 239 } 240 241 // SetHostname indicates an expected call of SetHostname. 242 func (mr *MockInstanceMockRecorder) SetHostname(value interface{}) *gomock.Call { 243 mr.mock.ctrl.T.Helper() 244 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHostname", reflect.TypeOf((*MockInstance)(nil).SetHostname), value) 245 } 246 247 // SetID mocks base method. 248 func (m *MockInstance) SetID(id string) Instance { 249 m.ctrl.T.Helper() 250 ret := m.ctrl.Call(m, "SetID", id) 251 ret0, _ := ret[0].(Instance) 252 return ret0 253 } 254 255 // SetID indicates an expected call of SetID. 256 func (mr *MockInstanceMockRecorder) SetID(id interface{}) *gomock.Call { 257 mr.mock.ctrl.T.Helper() 258 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetID", reflect.TypeOf((*MockInstance)(nil).SetID), id) 259 } 260 261 // SetIsolationGroup mocks base method. 262 func (m *MockInstance) SetIsolationGroup(r string) Instance { 263 m.ctrl.T.Helper() 264 ret := m.ctrl.Call(m, "SetIsolationGroup", r) 265 ret0, _ := ret[0].(Instance) 266 return ret0 267 } 268 269 // SetIsolationGroup indicates an expected call of SetIsolationGroup. 270 func (mr *MockInstanceMockRecorder) SetIsolationGroup(r interface{}) *gomock.Call { 271 mr.mock.ctrl.T.Helper() 272 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsolationGroup", reflect.TypeOf((*MockInstance)(nil).SetIsolationGroup), r) 273 } 274 275 // SetMetadata mocks base method. 276 func (m *MockInstance) SetMetadata(value InstanceMetadata) Instance { 277 m.ctrl.T.Helper() 278 ret := m.ctrl.Call(m, "SetMetadata", value) 279 ret0, _ := ret[0].(Instance) 280 return ret0 281 } 282 283 // SetMetadata indicates an expected call of SetMetadata. 284 func (mr *MockInstanceMockRecorder) SetMetadata(value interface{}) *gomock.Call { 285 mr.mock.ctrl.T.Helper() 286 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMetadata", reflect.TypeOf((*MockInstance)(nil).SetMetadata), value) 287 } 288 289 // SetPort mocks base method. 290 func (m *MockInstance) SetPort(value uint32) Instance { 291 m.ctrl.T.Helper() 292 ret := m.ctrl.Call(m, "SetPort", value) 293 ret0, _ := ret[0].(Instance) 294 return ret0 295 } 296 297 // SetPort indicates an expected call of SetPort. 298 func (mr *MockInstanceMockRecorder) SetPort(value interface{}) *gomock.Call { 299 mr.mock.ctrl.T.Helper() 300 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPort", reflect.TypeOf((*MockInstance)(nil).SetPort), value) 301 } 302 303 // SetShardSetID mocks base method. 304 func (m *MockInstance) SetShardSetID(value uint32) Instance { 305 m.ctrl.T.Helper() 306 ret := m.ctrl.Call(m, "SetShardSetID", value) 307 ret0, _ := ret[0].(Instance) 308 return ret0 309 } 310 311 // SetShardSetID indicates an expected call of SetShardSetID. 312 func (mr *MockInstanceMockRecorder) SetShardSetID(value interface{}) *gomock.Call { 313 mr.mock.ctrl.T.Helper() 314 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShardSetID", reflect.TypeOf((*MockInstance)(nil).SetShardSetID), value) 315 } 316 317 // SetShards mocks base method. 318 func (m *MockInstance) SetShards(s shard.Shards) Instance { 319 m.ctrl.T.Helper() 320 ret := m.ctrl.Call(m, "SetShards", s) 321 ret0, _ := ret[0].(Instance) 322 return ret0 323 } 324 325 // SetShards indicates an expected call of SetShards. 326 func (mr *MockInstanceMockRecorder) SetShards(s interface{}) *gomock.Call { 327 mr.mock.ctrl.T.Helper() 328 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShards", reflect.TypeOf((*MockInstance)(nil).SetShards), s) 329 } 330 331 // SetWeight mocks base method. 332 func (m *MockInstance) SetWeight(w uint32) Instance { 333 m.ctrl.T.Helper() 334 ret := m.ctrl.Call(m, "SetWeight", w) 335 ret0, _ := ret[0].(Instance) 336 return ret0 337 } 338 339 // SetWeight indicates an expected call of SetWeight. 340 func (mr *MockInstanceMockRecorder) SetWeight(w interface{}) *gomock.Call { 341 mr.mock.ctrl.T.Helper() 342 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWeight", reflect.TypeOf((*MockInstance)(nil).SetWeight), w) 343 } 344 345 // SetZone mocks base method. 346 func (m *MockInstance) SetZone(z string) Instance { 347 m.ctrl.T.Helper() 348 ret := m.ctrl.Call(m, "SetZone", z) 349 ret0, _ := ret[0].(Instance) 350 return ret0 351 } 352 353 // SetZone indicates an expected call of SetZone. 354 func (mr *MockInstanceMockRecorder) SetZone(z interface{}) *gomock.Call { 355 mr.mock.ctrl.T.Helper() 356 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetZone", reflect.TypeOf((*MockInstance)(nil).SetZone), z) 357 } 358 359 // ShardSetID mocks base method. 360 func (m *MockInstance) ShardSetID() uint32 { 361 m.ctrl.T.Helper() 362 ret := m.ctrl.Call(m, "ShardSetID") 363 ret0, _ := ret[0].(uint32) 364 return ret0 365 } 366 367 // ShardSetID indicates an expected call of ShardSetID. 368 func (mr *MockInstanceMockRecorder) ShardSetID() *gomock.Call { 369 mr.mock.ctrl.T.Helper() 370 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardSetID", reflect.TypeOf((*MockInstance)(nil).ShardSetID)) 371 } 372 373 // Shards mocks base method. 374 func (m *MockInstance) Shards() shard.Shards { 375 m.ctrl.T.Helper() 376 ret := m.ctrl.Call(m, "Shards") 377 ret0, _ := ret[0].(shard.Shards) 378 return ret0 379 } 380 381 // Shards indicates an expected call of Shards. 382 func (mr *MockInstanceMockRecorder) Shards() *gomock.Call { 383 mr.mock.ctrl.T.Helper() 384 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shards", reflect.TypeOf((*MockInstance)(nil).Shards)) 385 } 386 387 // String mocks base method. 388 func (m *MockInstance) String() string { 389 m.ctrl.T.Helper() 390 ret := m.ctrl.Call(m, "String") 391 ret0, _ := ret[0].(string) 392 return ret0 393 } 394 395 // String indicates an expected call of String. 396 func (mr *MockInstanceMockRecorder) String() *gomock.Call { 397 mr.mock.ctrl.T.Helper() 398 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockInstance)(nil).String)) 399 } 400 401 // Weight mocks base method. 402 func (m *MockInstance) Weight() uint32 { 403 m.ctrl.T.Helper() 404 ret := m.ctrl.Call(m, "Weight") 405 ret0, _ := ret[0].(uint32) 406 return ret0 407 } 408 409 // Weight indicates an expected call of Weight. 410 func (mr *MockInstanceMockRecorder) Weight() *gomock.Call { 411 mr.mock.ctrl.T.Helper() 412 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Weight", reflect.TypeOf((*MockInstance)(nil).Weight)) 413 } 414 415 // Zone mocks base method. 416 func (m *MockInstance) Zone() string { 417 m.ctrl.T.Helper() 418 ret := m.ctrl.Call(m, "Zone") 419 ret0, _ := ret[0].(string) 420 return ret0 421 } 422 423 // Zone indicates an expected call of Zone. 424 func (mr *MockInstanceMockRecorder) Zone() *gomock.Call { 425 mr.mock.ctrl.T.Helper() 426 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Zone", reflect.TypeOf((*MockInstance)(nil).Zone)) 427 } 428 429 // MockPlacement is a mock of Placement interface. 430 type MockPlacement struct { 431 ctrl *gomock.Controller 432 recorder *MockPlacementMockRecorder 433 } 434 435 // MockPlacementMockRecorder is the mock recorder for MockPlacement. 436 type MockPlacementMockRecorder struct { 437 mock *MockPlacement 438 } 439 440 // NewMockPlacement creates a new mock instance. 441 func NewMockPlacement(ctrl *gomock.Controller) *MockPlacement { 442 mock := &MockPlacement{ctrl: ctrl} 443 mock.recorder = &MockPlacementMockRecorder{mock} 444 return mock 445 } 446 447 // EXPECT returns an object that allows the caller to indicate expected use. 448 func (m *MockPlacement) EXPECT() *MockPlacementMockRecorder { 449 return m.recorder 450 } 451 452 // Clone mocks base method. 453 func (m *MockPlacement) Clone() Placement { 454 m.ctrl.T.Helper() 455 ret := m.ctrl.Call(m, "Clone") 456 ret0, _ := ret[0].(Placement) 457 return ret0 458 } 459 460 // Clone indicates an expected call of Clone. 461 func (mr *MockPlacementMockRecorder) Clone() *gomock.Call { 462 mr.mock.ctrl.T.Helper() 463 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clone", reflect.TypeOf((*MockPlacement)(nil).Clone)) 464 } 465 466 // CutoverNanos mocks base method. 467 func (m *MockPlacement) CutoverNanos() int64 { 468 m.ctrl.T.Helper() 469 ret := m.ctrl.Call(m, "CutoverNanos") 470 ret0, _ := ret[0].(int64) 471 return ret0 472 } 473 474 // CutoverNanos indicates an expected call of CutoverNanos. 475 func (mr *MockPlacementMockRecorder) CutoverNanos() *gomock.Call { 476 mr.mock.ctrl.T.Helper() 477 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CutoverNanos", reflect.TypeOf((*MockPlacement)(nil).CutoverNanos)) 478 } 479 480 // Instance mocks base method. 481 func (m *MockPlacement) Instance(id string) (Instance, bool) { 482 m.ctrl.T.Helper() 483 ret := m.ctrl.Call(m, "Instance", id) 484 ret0, _ := ret[0].(Instance) 485 ret1, _ := ret[1].(bool) 486 return ret0, ret1 487 } 488 489 // Instance indicates an expected call of Instance. 490 func (mr *MockPlacementMockRecorder) Instance(id interface{}) *gomock.Call { 491 mr.mock.ctrl.T.Helper() 492 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instance", reflect.TypeOf((*MockPlacement)(nil).Instance), id) 493 } 494 495 // Instances mocks base method. 496 func (m *MockPlacement) Instances() []Instance { 497 m.ctrl.T.Helper() 498 ret := m.ctrl.Call(m, "Instances") 499 ret0, _ := ret[0].([]Instance) 500 return ret0 501 } 502 503 // Instances indicates an expected call of Instances. 504 func (mr *MockPlacementMockRecorder) Instances() *gomock.Call { 505 mr.mock.ctrl.T.Helper() 506 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Instances", reflect.TypeOf((*MockPlacement)(nil).Instances)) 507 } 508 509 // InstancesForShard mocks base method. 510 func (m *MockPlacement) InstancesForShard(shard uint32) []Instance { 511 m.ctrl.T.Helper() 512 ret := m.ctrl.Call(m, "InstancesForShard", shard) 513 ret0, _ := ret[0].([]Instance) 514 return ret0 515 } 516 517 // InstancesForShard indicates an expected call of InstancesForShard. 518 func (mr *MockPlacementMockRecorder) InstancesForShard(shard interface{}) *gomock.Call { 519 mr.mock.ctrl.T.Helper() 520 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstancesForShard", reflect.TypeOf((*MockPlacement)(nil).InstancesForShard), shard) 521 } 522 523 // IsMirrored mocks base method. 524 func (m *MockPlacement) IsMirrored() bool { 525 m.ctrl.T.Helper() 526 ret := m.ctrl.Call(m, "IsMirrored") 527 ret0, _ := ret[0].(bool) 528 return ret0 529 } 530 531 // IsMirrored indicates an expected call of IsMirrored. 532 func (mr *MockPlacementMockRecorder) IsMirrored() *gomock.Call { 533 mr.mock.ctrl.T.Helper() 534 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsMirrored", reflect.TypeOf((*MockPlacement)(nil).IsMirrored)) 535 } 536 537 // IsSharded mocks base method. 538 func (m *MockPlacement) IsSharded() bool { 539 m.ctrl.T.Helper() 540 ret := m.ctrl.Call(m, "IsSharded") 541 ret0, _ := ret[0].(bool) 542 return ret0 543 } 544 545 // IsSharded indicates an expected call of IsSharded. 546 func (mr *MockPlacementMockRecorder) IsSharded() *gomock.Call { 547 mr.mock.ctrl.T.Helper() 548 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSharded", reflect.TypeOf((*MockPlacement)(nil).IsSharded)) 549 } 550 551 // MaxShardSetID mocks base method. 552 func (m *MockPlacement) MaxShardSetID() uint32 { 553 m.ctrl.T.Helper() 554 ret := m.ctrl.Call(m, "MaxShardSetID") 555 ret0, _ := ret[0].(uint32) 556 return ret0 557 } 558 559 // MaxShardSetID indicates an expected call of MaxShardSetID. 560 func (mr *MockPlacementMockRecorder) MaxShardSetID() *gomock.Call { 561 mr.mock.ctrl.T.Helper() 562 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxShardSetID", reflect.TypeOf((*MockPlacement)(nil).MaxShardSetID)) 563 } 564 565 // NumInstances mocks base method. 566 func (m *MockPlacement) NumInstances() int { 567 m.ctrl.T.Helper() 568 ret := m.ctrl.Call(m, "NumInstances") 569 ret0, _ := ret[0].(int) 570 return ret0 571 } 572 573 // NumInstances indicates an expected call of NumInstances. 574 func (mr *MockPlacementMockRecorder) NumInstances() *gomock.Call { 575 mr.mock.ctrl.T.Helper() 576 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumInstances", reflect.TypeOf((*MockPlacement)(nil).NumInstances)) 577 } 578 579 // NumShards mocks base method. 580 func (m *MockPlacement) NumShards() int { 581 m.ctrl.T.Helper() 582 ret := m.ctrl.Call(m, "NumShards") 583 ret0, _ := ret[0].(int) 584 return ret0 585 } 586 587 // NumShards indicates an expected call of NumShards. 588 func (mr *MockPlacementMockRecorder) NumShards() *gomock.Call { 589 mr.mock.ctrl.T.Helper() 590 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NumShards", reflect.TypeOf((*MockPlacement)(nil).NumShards)) 591 } 592 593 // Proto mocks base method. 594 func (m *MockPlacement) Proto() (*placementpb.Placement, error) { 595 m.ctrl.T.Helper() 596 ret := m.ctrl.Call(m, "Proto") 597 ret0, _ := ret[0].(*placementpb.Placement) 598 ret1, _ := ret[1].(error) 599 return ret0, ret1 600 } 601 602 // Proto indicates an expected call of Proto. 603 func (mr *MockPlacementMockRecorder) Proto() *gomock.Call { 604 mr.mock.ctrl.T.Helper() 605 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proto", reflect.TypeOf((*MockPlacement)(nil).Proto)) 606 } 607 608 // ReplicaFactor mocks base method. 609 func (m *MockPlacement) ReplicaFactor() int { 610 m.ctrl.T.Helper() 611 ret := m.ctrl.Call(m, "ReplicaFactor") 612 ret0, _ := ret[0].(int) 613 return ret0 614 } 615 616 // ReplicaFactor indicates an expected call of ReplicaFactor. 617 func (mr *MockPlacementMockRecorder) ReplicaFactor() *gomock.Call { 618 mr.mock.ctrl.T.Helper() 619 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplicaFactor", reflect.TypeOf((*MockPlacement)(nil).ReplicaFactor)) 620 } 621 622 // SetCutoverNanos mocks base method. 623 func (m *MockPlacement) SetCutoverNanos(cutoverNanos int64) Placement { 624 m.ctrl.T.Helper() 625 ret := m.ctrl.Call(m, "SetCutoverNanos", cutoverNanos) 626 ret0, _ := ret[0].(Placement) 627 return ret0 628 } 629 630 // SetCutoverNanos indicates an expected call of SetCutoverNanos. 631 func (mr *MockPlacementMockRecorder) SetCutoverNanos(cutoverNanos interface{}) *gomock.Call { 632 mr.mock.ctrl.T.Helper() 633 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCutoverNanos", reflect.TypeOf((*MockPlacement)(nil).SetCutoverNanos), cutoverNanos) 634 } 635 636 // SetInstances mocks base method. 637 func (m *MockPlacement) SetInstances(instances []Instance) Placement { 638 m.ctrl.T.Helper() 639 ret := m.ctrl.Call(m, "SetInstances", instances) 640 ret0, _ := ret[0].(Placement) 641 return ret0 642 } 643 644 // SetInstances indicates an expected call of SetInstances. 645 func (mr *MockPlacementMockRecorder) SetInstances(instances interface{}) *gomock.Call { 646 mr.mock.ctrl.T.Helper() 647 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstances", reflect.TypeOf((*MockPlacement)(nil).SetInstances), instances) 648 } 649 650 // SetIsMirrored mocks base method. 651 func (m *MockPlacement) SetIsMirrored(v bool) Placement { 652 m.ctrl.T.Helper() 653 ret := m.ctrl.Call(m, "SetIsMirrored", v) 654 ret0, _ := ret[0].(Placement) 655 return ret0 656 } 657 658 // SetIsMirrored indicates an expected call of SetIsMirrored. 659 func (mr *MockPlacementMockRecorder) SetIsMirrored(v interface{}) *gomock.Call { 660 mr.mock.ctrl.T.Helper() 661 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsMirrored", reflect.TypeOf((*MockPlacement)(nil).SetIsMirrored), v) 662 } 663 664 // SetIsSharded mocks base method. 665 func (m *MockPlacement) SetIsSharded(v bool) Placement { 666 m.ctrl.T.Helper() 667 ret := m.ctrl.Call(m, "SetIsSharded", v) 668 ret0, _ := ret[0].(Placement) 669 return ret0 670 } 671 672 // SetIsSharded indicates an expected call of SetIsSharded. 673 func (mr *MockPlacementMockRecorder) SetIsSharded(v interface{}) *gomock.Call { 674 mr.mock.ctrl.T.Helper() 675 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsSharded", reflect.TypeOf((*MockPlacement)(nil).SetIsSharded), v) 676 } 677 678 // SetMaxShardSetID mocks base method. 679 func (m *MockPlacement) SetMaxShardSetID(value uint32) Placement { 680 m.ctrl.T.Helper() 681 ret := m.ctrl.Call(m, "SetMaxShardSetID", value) 682 ret0, _ := ret[0].(Placement) 683 return ret0 684 } 685 686 // SetMaxShardSetID indicates an expected call of SetMaxShardSetID. 687 func (mr *MockPlacementMockRecorder) SetMaxShardSetID(value interface{}) *gomock.Call { 688 mr.mock.ctrl.T.Helper() 689 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxShardSetID", reflect.TypeOf((*MockPlacement)(nil).SetMaxShardSetID), value) 690 } 691 692 // SetReplicaFactor mocks base method. 693 func (m *MockPlacement) SetReplicaFactor(rf int) Placement { 694 m.ctrl.T.Helper() 695 ret := m.ctrl.Call(m, "SetReplicaFactor", rf) 696 ret0, _ := ret[0].(Placement) 697 return ret0 698 } 699 700 // SetReplicaFactor indicates an expected call of SetReplicaFactor. 701 func (mr *MockPlacementMockRecorder) SetReplicaFactor(rf interface{}) *gomock.Call { 702 mr.mock.ctrl.T.Helper() 703 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReplicaFactor", reflect.TypeOf((*MockPlacement)(nil).SetReplicaFactor), rf) 704 } 705 706 // SetShards mocks base method. 707 func (m *MockPlacement) SetShards(s []uint32) Placement { 708 m.ctrl.T.Helper() 709 ret := m.ctrl.Call(m, "SetShards", s) 710 ret0, _ := ret[0].(Placement) 711 return ret0 712 } 713 714 // SetShards indicates an expected call of SetShards. 715 func (mr *MockPlacementMockRecorder) SetShards(s interface{}) *gomock.Call { 716 mr.mock.ctrl.T.Helper() 717 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShards", reflect.TypeOf((*MockPlacement)(nil).SetShards), s) 718 } 719 720 // SetVersion mocks base method. 721 func (m *MockPlacement) SetVersion(v int) Placement { 722 m.ctrl.T.Helper() 723 ret := m.ctrl.Call(m, "SetVersion", v) 724 ret0, _ := ret[0].(Placement) 725 return ret0 726 } 727 728 // SetVersion indicates an expected call of SetVersion. 729 func (mr *MockPlacementMockRecorder) SetVersion(v interface{}) *gomock.Call { 730 mr.mock.ctrl.T.Helper() 731 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetVersion", reflect.TypeOf((*MockPlacement)(nil).SetVersion), v) 732 } 733 734 // Shards mocks base method. 735 func (m *MockPlacement) Shards() []uint32 { 736 m.ctrl.T.Helper() 737 ret := m.ctrl.Call(m, "Shards") 738 ret0, _ := ret[0].([]uint32) 739 return ret0 740 } 741 742 // Shards indicates an expected call of Shards. 743 func (mr *MockPlacementMockRecorder) Shards() *gomock.Call { 744 mr.mock.ctrl.T.Helper() 745 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shards", reflect.TypeOf((*MockPlacement)(nil).Shards)) 746 } 747 748 // String mocks base method. 749 func (m *MockPlacement) String() string { 750 m.ctrl.T.Helper() 751 ret := m.ctrl.Call(m, "String") 752 ret0, _ := ret[0].(string) 753 return ret0 754 } 755 756 // String indicates an expected call of String. 757 func (mr *MockPlacementMockRecorder) String() *gomock.Call { 758 mr.mock.ctrl.T.Helper() 759 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "String", reflect.TypeOf((*MockPlacement)(nil).String)) 760 } 761 762 // Version mocks base method. 763 func (m *MockPlacement) Version() int { 764 m.ctrl.T.Helper() 765 ret := m.ctrl.Call(m, "Version") 766 ret0, _ := ret[0].(int) 767 return ret0 768 } 769 770 // Version indicates an expected call of Version. 771 func (mr *MockPlacementMockRecorder) Version() *gomock.Call { 772 mr.mock.ctrl.T.Helper() 773 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockPlacement)(nil).Version)) 774 } 775 776 // MockWatch is a mock of Watch interface. 777 type MockWatch struct { 778 ctrl *gomock.Controller 779 recorder *MockWatchMockRecorder 780 } 781 782 // MockWatchMockRecorder is the mock recorder for MockWatch. 783 type MockWatchMockRecorder struct { 784 mock *MockWatch 785 } 786 787 // NewMockWatch creates a new mock instance. 788 func NewMockWatch(ctrl *gomock.Controller) *MockWatch { 789 mock := &MockWatch{ctrl: ctrl} 790 mock.recorder = &MockWatchMockRecorder{mock} 791 return mock 792 } 793 794 // EXPECT returns an object that allows the caller to indicate expected use. 795 func (m *MockWatch) EXPECT() *MockWatchMockRecorder { 796 return m.recorder 797 } 798 799 // C mocks base method. 800 func (m *MockWatch) C() <-chan struct{} { 801 m.ctrl.T.Helper() 802 ret := m.ctrl.Call(m, "C") 803 ret0, _ := ret[0].(<-chan struct{}) 804 return ret0 805 } 806 807 // C indicates an expected call of C. 808 func (mr *MockWatchMockRecorder) C() *gomock.Call { 809 mr.mock.ctrl.T.Helper() 810 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "C", reflect.TypeOf((*MockWatch)(nil).C)) 811 } 812 813 // Close mocks base method. 814 func (m *MockWatch) Close() { 815 m.ctrl.T.Helper() 816 m.ctrl.Call(m, "Close") 817 } 818 819 // Close indicates an expected call of Close. 820 func (mr *MockWatchMockRecorder) Close() *gomock.Call { 821 mr.mock.ctrl.T.Helper() 822 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockWatch)(nil).Close)) 823 } 824 825 // Get mocks base method. 826 func (m *MockWatch) Get() (Placement, error) { 827 m.ctrl.T.Helper() 828 ret := m.ctrl.Call(m, "Get") 829 ret0, _ := ret[0].(Placement) 830 ret1, _ := ret[1].(error) 831 return ret0, ret1 832 } 833 834 // Get indicates an expected call of Get. 835 func (mr *MockWatchMockRecorder) Get() *gomock.Call { 836 mr.mock.ctrl.T.Helper() 837 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatch)(nil).Get)) 838 } 839 840 // MockWatcher is a mock of Watcher interface. 841 type MockWatcher struct { 842 ctrl *gomock.Controller 843 recorder *MockWatcherMockRecorder 844 } 845 846 // MockWatcherMockRecorder is the mock recorder for MockWatcher. 847 type MockWatcherMockRecorder struct { 848 mock *MockWatcher 849 } 850 851 // NewMockWatcher creates a new mock instance. 852 func NewMockWatcher(ctrl *gomock.Controller) *MockWatcher { 853 mock := &MockWatcher{ctrl: ctrl} 854 mock.recorder = &MockWatcherMockRecorder{mock} 855 return mock 856 } 857 858 // EXPECT returns an object that allows the caller to indicate expected use. 859 func (m *MockWatcher) EXPECT() *MockWatcherMockRecorder { 860 return m.recorder 861 } 862 863 // Get mocks base method. 864 func (m *MockWatcher) Get() (Placement, error) { 865 m.ctrl.T.Helper() 866 ret := m.ctrl.Call(m, "Get") 867 ret0, _ := ret[0].(Placement) 868 ret1, _ := ret[1].(error) 869 return ret0, ret1 870 } 871 872 // Get indicates an expected call of Get. 873 func (mr *MockWatcherMockRecorder) Get() *gomock.Call { 874 mr.mock.ctrl.T.Helper() 875 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockWatcher)(nil).Get)) 876 } 877 878 // Unwatch mocks base method. 879 func (m *MockWatcher) Unwatch() error { 880 m.ctrl.T.Helper() 881 ret := m.ctrl.Call(m, "Unwatch") 882 ret0, _ := ret[0].(error) 883 return ret0 884 } 885 886 // Unwatch indicates an expected call of Unwatch. 887 func (mr *MockWatcherMockRecorder) Unwatch() *gomock.Call { 888 mr.mock.ctrl.T.Helper() 889 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unwatch", reflect.TypeOf((*MockWatcher)(nil).Unwatch)) 890 } 891 892 // Watch mocks base method. 893 func (m *MockWatcher) Watch() error { 894 m.ctrl.T.Helper() 895 ret := m.ctrl.Call(m, "Watch") 896 ret0, _ := ret[0].(error) 897 return ret0 898 } 899 900 // Watch indicates an expected call of Watch. 901 func (mr *MockWatcherMockRecorder) Watch() *gomock.Call { 902 mr.mock.ctrl.T.Helper() 903 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockWatcher)(nil).Watch)) 904 } 905 906 // MockWatcherOptions is a mock of WatcherOptions interface. 907 type MockWatcherOptions struct { 908 ctrl *gomock.Controller 909 recorder *MockWatcherOptionsMockRecorder 910 } 911 912 // MockWatcherOptionsMockRecorder is the mock recorder for MockWatcherOptions. 913 type MockWatcherOptionsMockRecorder struct { 914 mock *MockWatcherOptions 915 } 916 917 // NewMockWatcherOptions creates a new mock instance. 918 func NewMockWatcherOptions(ctrl *gomock.Controller) *MockWatcherOptions { 919 mock := &MockWatcherOptions{ctrl: ctrl} 920 mock.recorder = &MockWatcherOptionsMockRecorder{mock} 921 return mock 922 } 923 924 // EXPECT returns an object that allows the caller to indicate expected use. 925 func (m *MockWatcherOptions) EXPECT() *MockWatcherOptionsMockRecorder { 926 return m.recorder 927 } 928 929 // InitWatchTimeout mocks base method. 930 func (m *MockWatcherOptions) InitWatchTimeout() time.Duration { 931 m.ctrl.T.Helper() 932 ret := m.ctrl.Call(m, "InitWatchTimeout") 933 ret0, _ := ret[0].(time.Duration) 934 return ret0 935 } 936 937 // InitWatchTimeout indicates an expected call of InitWatchTimeout. 938 func (mr *MockWatcherOptionsMockRecorder) InitWatchTimeout() *gomock.Call { 939 mr.mock.ctrl.T.Helper() 940 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitWatchTimeout", reflect.TypeOf((*MockWatcherOptions)(nil).InitWatchTimeout)) 941 } 942 943 // InstrumentOptions mocks base method. 944 func (m *MockWatcherOptions) InstrumentOptions() instrument.Options { 945 m.ctrl.T.Helper() 946 ret := m.ctrl.Call(m, "InstrumentOptions") 947 ret0, _ := ret[0].(instrument.Options) 948 return ret0 949 } 950 951 // InstrumentOptions indicates an expected call of InstrumentOptions. 952 func (mr *MockWatcherOptionsMockRecorder) InstrumentOptions() *gomock.Call { 953 mr.mock.ctrl.T.Helper() 954 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstrumentOptions", reflect.TypeOf((*MockWatcherOptions)(nil).InstrumentOptions)) 955 } 956 957 // OnPlacementChangedFn mocks base method. 958 func (m *MockWatcherOptions) OnPlacementChangedFn() OnPlacementChangedFn { 959 m.ctrl.T.Helper() 960 ret := m.ctrl.Call(m, "OnPlacementChangedFn") 961 ret0, _ := ret[0].(OnPlacementChangedFn) 962 return ret0 963 } 964 965 // OnPlacementChangedFn indicates an expected call of OnPlacementChangedFn. 966 func (mr *MockWatcherOptionsMockRecorder) OnPlacementChangedFn() *gomock.Call { 967 mr.mock.ctrl.T.Helper() 968 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPlacementChangedFn", reflect.TypeOf((*MockWatcherOptions)(nil).OnPlacementChangedFn)) 969 } 970 971 // SetInitWatchTimeout mocks base method. 972 func (m *MockWatcherOptions) SetInitWatchTimeout(value time.Duration) WatcherOptions { 973 m.ctrl.T.Helper() 974 ret := m.ctrl.Call(m, "SetInitWatchTimeout", value) 975 ret0, _ := ret[0].(WatcherOptions) 976 return ret0 977 } 978 979 // SetInitWatchTimeout indicates an expected call of SetInitWatchTimeout. 980 func (mr *MockWatcherOptionsMockRecorder) SetInitWatchTimeout(value interface{}) *gomock.Call { 981 mr.mock.ctrl.T.Helper() 982 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInitWatchTimeout", reflect.TypeOf((*MockWatcherOptions)(nil).SetInitWatchTimeout), value) 983 } 984 985 // SetInstrumentOptions mocks base method. 986 func (m *MockWatcherOptions) SetInstrumentOptions(value instrument.Options) WatcherOptions { 987 m.ctrl.T.Helper() 988 ret := m.ctrl.Call(m, "SetInstrumentOptions", value) 989 ret0, _ := ret[0].(WatcherOptions) 990 return ret0 991 } 992 993 // SetInstrumentOptions indicates an expected call of SetInstrumentOptions. 994 func (mr *MockWatcherOptionsMockRecorder) SetInstrumentOptions(value interface{}) *gomock.Call { 995 mr.mock.ctrl.T.Helper() 996 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstrumentOptions", reflect.TypeOf((*MockWatcherOptions)(nil).SetInstrumentOptions), value) 997 } 998 999 // SetOnPlacementChangedFn mocks base method. 1000 func (m *MockWatcherOptions) SetOnPlacementChangedFn(value OnPlacementChangedFn) WatcherOptions { 1001 m.ctrl.T.Helper() 1002 ret := m.ctrl.Call(m, "SetOnPlacementChangedFn", value) 1003 ret0, _ := ret[0].(WatcherOptions) 1004 return ret0 1005 } 1006 1007 // SetOnPlacementChangedFn indicates an expected call of SetOnPlacementChangedFn. 1008 func (mr *MockWatcherOptionsMockRecorder) SetOnPlacementChangedFn(value interface{}) *gomock.Call { 1009 mr.mock.ctrl.T.Helper() 1010 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOnPlacementChangedFn", reflect.TypeOf((*MockWatcherOptions)(nil).SetOnPlacementChangedFn), value) 1011 } 1012 1013 // SetStagedPlacementKey mocks base method. 1014 func (m *MockWatcherOptions) SetStagedPlacementKey(value string) WatcherOptions { 1015 m.ctrl.T.Helper() 1016 ret := m.ctrl.Call(m, "SetStagedPlacementKey", value) 1017 ret0, _ := ret[0].(WatcherOptions) 1018 return ret0 1019 } 1020 1021 // SetStagedPlacementKey indicates an expected call of SetStagedPlacementKey. 1022 func (mr *MockWatcherOptionsMockRecorder) SetStagedPlacementKey(value interface{}) *gomock.Call { 1023 mr.mock.ctrl.T.Helper() 1024 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStagedPlacementKey", reflect.TypeOf((*MockWatcherOptions)(nil).SetStagedPlacementKey), value) 1025 } 1026 1027 // SetStagedPlacementStore mocks base method. 1028 func (m *MockWatcherOptions) SetStagedPlacementStore(store kv.Store) WatcherOptions { 1029 m.ctrl.T.Helper() 1030 ret := m.ctrl.Call(m, "SetStagedPlacementStore", store) 1031 ret0, _ := ret[0].(WatcherOptions) 1032 return ret0 1033 } 1034 1035 // SetStagedPlacementStore indicates an expected call of SetStagedPlacementStore. 1036 func (mr *MockWatcherOptionsMockRecorder) SetStagedPlacementStore(store interface{}) *gomock.Call { 1037 mr.mock.ctrl.T.Helper() 1038 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetStagedPlacementStore", reflect.TypeOf((*MockWatcherOptions)(nil).SetStagedPlacementStore), store) 1039 } 1040 1041 // StagedPlacementKey mocks base method. 1042 func (m *MockWatcherOptions) StagedPlacementKey() string { 1043 m.ctrl.T.Helper() 1044 ret := m.ctrl.Call(m, "StagedPlacementKey") 1045 ret0, _ := ret[0].(string) 1046 return ret0 1047 } 1048 1049 // StagedPlacementKey indicates an expected call of StagedPlacementKey. 1050 func (mr *MockWatcherOptionsMockRecorder) StagedPlacementKey() *gomock.Call { 1051 mr.mock.ctrl.T.Helper() 1052 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StagedPlacementKey", reflect.TypeOf((*MockWatcherOptions)(nil).StagedPlacementKey)) 1053 } 1054 1055 // StagedPlacementStore mocks base method. 1056 func (m *MockWatcherOptions) StagedPlacementStore() kv.Store { 1057 m.ctrl.T.Helper() 1058 ret := m.ctrl.Call(m, "StagedPlacementStore") 1059 ret0, _ := ret[0].(kv.Store) 1060 return ret0 1061 } 1062 1063 // StagedPlacementStore indicates an expected call of StagedPlacementStore. 1064 func (mr *MockWatcherOptionsMockRecorder) StagedPlacementStore() *gomock.Call { 1065 mr.mock.ctrl.T.Helper() 1066 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StagedPlacementStore", reflect.TypeOf((*MockWatcherOptions)(nil).StagedPlacementStore)) 1067 } 1068 1069 // MockOptions is a mock of Options interface. 1070 type MockOptions struct { 1071 ctrl *gomock.Controller 1072 recorder *MockOptionsMockRecorder 1073 } 1074 1075 // MockOptionsMockRecorder is the mock recorder for MockOptions. 1076 type MockOptionsMockRecorder struct { 1077 mock *MockOptions 1078 } 1079 1080 // NewMockOptions creates a new mock instance. 1081 func NewMockOptions(ctrl *gomock.Controller) *MockOptions { 1082 mock := &MockOptions{ctrl: ctrl} 1083 mock.recorder = &MockOptionsMockRecorder{mock} 1084 return mock 1085 } 1086 1087 // EXPECT returns an object that allows the caller to indicate expected use. 1088 func (m *MockOptions) EXPECT() *MockOptionsMockRecorder { 1089 return m.recorder 1090 } 1091 1092 // AddAllCandidates mocks base method. 1093 func (m *MockOptions) AddAllCandidates() bool { 1094 m.ctrl.T.Helper() 1095 ret := m.ctrl.Call(m, "AddAllCandidates") 1096 ret0, _ := ret[0].(bool) 1097 return ret0 1098 } 1099 1100 // AddAllCandidates indicates an expected call of AddAllCandidates. 1101 func (mr *MockOptionsMockRecorder) AddAllCandidates() *gomock.Call { 1102 mr.mock.ctrl.T.Helper() 1103 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAllCandidates", reflect.TypeOf((*MockOptions)(nil).AddAllCandidates)) 1104 } 1105 1106 // AllowAllZones mocks base method. 1107 func (m *MockOptions) AllowAllZones() bool { 1108 m.ctrl.T.Helper() 1109 ret := m.ctrl.Call(m, "AllowAllZones") 1110 ret0, _ := ret[0].(bool) 1111 return ret0 1112 } 1113 1114 // AllowAllZones indicates an expected call of AllowAllZones. 1115 func (mr *MockOptionsMockRecorder) AllowAllZones() *gomock.Call { 1116 mr.mock.ctrl.T.Helper() 1117 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllowAllZones", reflect.TypeOf((*MockOptions)(nil).AllowAllZones)) 1118 } 1119 1120 // AllowPartialReplace mocks base method. 1121 func (m *MockOptions) AllowPartialReplace() bool { 1122 m.ctrl.T.Helper() 1123 ret := m.ctrl.Call(m, "AllowPartialReplace") 1124 ret0, _ := ret[0].(bool) 1125 return ret0 1126 } 1127 1128 // AllowPartialReplace indicates an expected call of AllowPartialReplace. 1129 func (mr *MockOptionsMockRecorder) AllowPartialReplace() *gomock.Call { 1130 mr.mock.ctrl.T.Helper() 1131 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AllowPartialReplace", reflect.TypeOf((*MockOptions)(nil).AllowPartialReplace)) 1132 } 1133 1134 // Compress mocks base method. 1135 func (m *MockOptions) Compress() bool { 1136 m.ctrl.T.Helper() 1137 ret := m.ctrl.Call(m, "Compress") 1138 ret0, _ := ret[0].(bool) 1139 return ret0 1140 } 1141 1142 // Compress indicates an expected call of Compress. 1143 func (mr *MockOptionsMockRecorder) Compress() *gomock.Call { 1144 mr.mock.ctrl.T.Helper() 1145 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Compress", reflect.TypeOf((*MockOptions)(nil).Compress)) 1146 } 1147 1148 // Dryrun mocks base method. 1149 func (m *MockOptions) Dryrun() bool { 1150 m.ctrl.T.Helper() 1151 ret := m.ctrl.Call(m, "Dryrun") 1152 ret0, _ := ret[0].(bool) 1153 return ret0 1154 } 1155 1156 // Dryrun indicates an expected call of Dryrun. 1157 func (mr *MockOptionsMockRecorder) Dryrun() *gomock.Call { 1158 mr.mock.ctrl.T.Helper() 1159 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Dryrun", reflect.TypeOf((*MockOptions)(nil).Dryrun)) 1160 } 1161 1162 // InstanceSelector mocks base method. 1163 func (m *MockOptions) InstanceSelector() InstanceSelector { 1164 m.ctrl.T.Helper() 1165 ret := m.ctrl.Call(m, "InstanceSelector") 1166 ret0, _ := ret[0].(InstanceSelector) 1167 return ret0 1168 } 1169 1170 // InstanceSelector indicates an expected call of InstanceSelector. 1171 func (mr *MockOptionsMockRecorder) InstanceSelector() *gomock.Call { 1172 mr.mock.ctrl.T.Helper() 1173 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstanceSelector", reflect.TypeOf((*MockOptions)(nil).InstanceSelector)) 1174 } 1175 1176 // InstrumentOptions mocks base method. 1177 func (m *MockOptions) InstrumentOptions() instrument.Options { 1178 m.ctrl.T.Helper() 1179 ret := m.ctrl.Call(m, "InstrumentOptions") 1180 ret0, _ := ret[0].(instrument.Options) 1181 return ret0 1182 } 1183 1184 // InstrumentOptions indicates an expected call of InstrumentOptions. 1185 func (mr *MockOptionsMockRecorder) InstrumentOptions() *gomock.Call { 1186 mr.mock.ctrl.T.Helper() 1187 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstrumentOptions", reflect.TypeOf((*MockOptions)(nil).InstrumentOptions)) 1188 } 1189 1190 // IsMirrored mocks base method. 1191 func (m *MockOptions) IsMirrored() bool { 1192 m.ctrl.T.Helper() 1193 ret := m.ctrl.Call(m, "IsMirrored") 1194 ret0, _ := ret[0].(bool) 1195 return ret0 1196 } 1197 1198 // IsMirrored indicates an expected call of IsMirrored. 1199 func (mr *MockOptionsMockRecorder) IsMirrored() *gomock.Call { 1200 mr.mock.ctrl.T.Helper() 1201 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsMirrored", reflect.TypeOf((*MockOptions)(nil).IsMirrored)) 1202 } 1203 1204 // IsShardCutoffFn mocks base method. 1205 func (m *MockOptions) IsShardCutoffFn() ShardValidateFn { 1206 m.ctrl.T.Helper() 1207 ret := m.ctrl.Call(m, "IsShardCutoffFn") 1208 ret0, _ := ret[0].(ShardValidateFn) 1209 return ret0 1210 } 1211 1212 // IsShardCutoffFn indicates an expected call of IsShardCutoffFn. 1213 func (mr *MockOptionsMockRecorder) IsShardCutoffFn() *gomock.Call { 1214 mr.mock.ctrl.T.Helper() 1215 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsShardCutoffFn", reflect.TypeOf((*MockOptions)(nil).IsShardCutoffFn)) 1216 } 1217 1218 // IsShardCutoverFn mocks base method. 1219 func (m *MockOptions) IsShardCutoverFn() ShardValidateFn { 1220 m.ctrl.T.Helper() 1221 ret := m.ctrl.Call(m, "IsShardCutoverFn") 1222 ret0, _ := ret[0].(ShardValidateFn) 1223 return ret0 1224 } 1225 1226 // IsShardCutoverFn indicates an expected call of IsShardCutoverFn. 1227 func (mr *MockOptionsMockRecorder) IsShardCutoverFn() *gomock.Call { 1228 mr.mock.ctrl.T.Helper() 1229 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsShardCutoverFn", reflect.TypeOf((*MockOptions)(nil).IsShardCutoverFn)) 1230 } 1231 1232 // IsSharded mocks base method. 1233 func (m *MockOptions) IsSharded() bool { 1234 m.ctrl.T.Helper() 1235 ret := m.ctrl.Call(m, "IsSharded") 1236 ret0, _ := ret[0].(bool) 1237 return ret0 1238 } 1239 1240 // IsSharded indicates an expected call of IsSharded. 1241 func (mr *MockOptionsMockRecorder) IsSharded() *gomock.Call { 1242 mr.mock.ctrl.T.Helper() 1243 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsSharded", reflect.TypeOf((*MockOptions)(nil).IsSharded)) 1244 } 1245 1246 // IsStaged mocks base method. 1247 func (m *MockOptions) IsStaged() bool { 1248 m.ctrl.T.Helper() 1249 ret := m.ctrl.Call(m, "IsStaged") 1250 ret0, _ := ret[0].(bool) 1251 return ret0 1252 } 1253 1254 // IsStaged indicates an expected call of IsStaged. 1255 func (mr *MockOptionsMockRecorder) IsStaged() *gomock.Call { 1256 mr.mock.ctrl.T.Helper() 1257 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsStaged", reflect.TypeOf((*MockOptions)(nil).IsStaged)) 1258 } 1259 1260 // NowFn mocks base method. 1261 func (m *MockOptions) NowFn() clock.NowFn { 1262 m.ctrl.T.Helper() 1263 ret := m.ctrl.Call(m, "NowFn") 1264 ret0, _ := ret[0].(clock.NowFn) 1265 return ret0 1266 } 1267 1268 // NowFn indicates an expected call of NowFn. 1269 func (mr *MockOptionsMockRecorder) NowFn() *gomock.Call { 1270 mr.mock.ctrl.T.Helper() 1271 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NowFn", reflect.TypeOf((*MockOptions)(nil).NowFn)) 1272 } 1273 1274 // PlacementCutoverNanosFn mocks base method. 1275 func (m *MockOptions) PlacementCutoverNanosFn() TimeNanosFn { 1276 m.ctrl.T.Helper() 1277 ret := m.ctrl.Call(m, "PlacementCutoverNanosFn") 1278 ret0, _ := ret[0].(TimeNanosFn) 1279 return ret0 1280 } 1281 1282 // PlacementCutoverNanosFn indicates an expected call of PlacementCutoverNanosFn. 1283 func (mr *MockOptionsMockRecorder) PlacementCutoverNanosFn() *gomock.Call { 1284 mr.mock.ctrl.T.Helper() 1285 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PlacementCutoverNanosFn", reflect.TypeOf((*MockOptions)(nil).PlacementCutoverNanosFn)) 1286 } 1287 1288 // SetAddAllCandidates mocks base method. 1289 func (m *MockOptions) SetAddAllCandidates(addAllCandidates bool) Options { 1290 m.ctrl.T.Helper() 1291 ret := m.ctrl.Call(m, "SetAddAllCandidates", addAllCandidates) 1292 ret0, _ := ret[0].(Options) 1293 return ret0 1294 } 1295 1296 // SetAddAllCandidates indicates an expected call of SetAddAllCandidates. 1297 func (mr *MockOptionsMockRecorder) SetAddAllCandidates(addAllCandidates interface{}) *gomock.Call { 1298 mr.mock.ctrl.T.Helper() 1299 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddAllCandidates", reflect.TypeOf((*MockOptions)(nil).SetAddAllCandidates), addAllCandidates) 1300 } 1301 1302 // SetAllowAllZones mocks base method. 1303 func (m *MockOptions) SetAllowAllZones(allowAllZones bool) Options { 1304 m.ctrl.T.Helper() 1305 ret := m.ctrl.Call(m, "SetAllowAllZones", allowAllZones) 1306 ret0, _ := ret[0].(Options) 1307 return ret0 1308 } 1309 1310 // SetAllowAllZones indicates an expected call of SetAllowAllZones. 1311 func (mr *MockOptionsMockRecorder) SetAllowAllZones(allowAllZones interface{}) *gomock.Call { 1312 mr.mock.ctrl.T.Helper() 1313 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllowAllZones", reflect.TypeOf((*MockOptions)(nil).SetAllowAllZones), allowAllZones) 1314 } 1315 1316 // SetAllowPartialReplace mocks base method. 1317 func (m *MockOptions) SetAllowPartialReplace(allowPartialReplace bool) Options { 1318 m.ctrl.T.Helper() 1319 ret := m.ctrl.Call(m, "SetAllowPartialReplace", allowPartialReplace) 1320 ret0, _ := ret[0].(Options) 1321 return ret0 1322 } 1323 1324 // SetAllowPartialReplace indicates an expected call of SetAllowPartialReplace. 1325 func (mr *MockOptionsMockRecorder) SetAllowPartialReplace(allowPartialReplace interface{}) *gomock.Call { 1326 mr.mock.ctrl.T.Helper() 1327 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAllowPartialReplace", reflect.TypeOf((*MockOptions)(nil).SetAllowPartialReplace), allowPartialReplace) 1328 } 1329 1330 // SetCompress mocks base method. 1331 func (m *MockOptions) SetCompress(v bool) Options { 1332 m.ctrl.T.Helper() 1333 ret := m.ctrl.Call(m, "SetCompress", v) 1334 ret0, _ := ret[0].(Options) 1335 return ret0 1336 } 1337 1338 // SetCompress indicates an expected call of SetCompress. 1339 func (mr *MockOptionsMockRecorder) SetCompress(v interface{}) *gomock.Call { 1340 mr.mock.ctrl.T.Helper() 1341 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCompress", reflect.TypeOf((*MockOptions)(nil).SetCompress), v) 1342 } 1343 1344 // SetDryrun mocks base method. 1345 func (m *MockOptions) SetDryrun(d bool) Options { 1346 m.ctrl.T.Helper() 1347 ret := m.ctrl.Call(m, "SetDryrun", d) 1348 ret0, _ := ret[0].(Options) 1349 return ret0 1350 } 1351 1352 // SetDryrun indicates an expected call of SetDryrun. 1353 func (mr *MockOptionsMockRecorder) SetDryrun(d interface{}) *gomock.Call { 1354 mr.mock.ctrl.T.Helper() 1355 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDryrun", reflect.TypeOf((*MockOptions)(nil).SetDryrun), d) 1356 } 1357 1358 // SetInstanceSelector mocks base method. 1359 func (m *MockOptions) SetInstanceSelector(s InstanceSelector) Options { 1360 m.ctrl.T.Helper() 1361 ret := m.ctrl.Call(m, "SetInstanceSelector", s) 1362 ret0, _ := ret[0].(Options) 1363 return ret0 1364 } 1365 1366 // SetInstanceSelector indicates an expected call of SetInstanceSelector. 1367 func (mr *MockOptionsMockRecorder) SetInstanceSelector(s interface{}) *gomock.Call { 1368 mr.mock.ctrl.T.Helper() 1369 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstanceSelector", reflect.TypeOf((*MockOptions)(nil).SetInstanceSelector), s) 1370 } 1371 1372 // SetInstrumentOptions mocks base method. 1373 func (m *MockOptions) SetInstrumentOptions(iopts instrument.Options) Options { 1374 m.ctrl.T.Helper() 1375 ret := m.ctrl.Call(m, "SetInstrumentOptions", iopts) 1376 ret0, _ := ret[0].(Options) 1377 return ret0 1378 } 1379 1380 // SetInstrumentOptions indicates an expected call of SetInstrumentOptions. 1381 func (mr *MockOptionsMockRecorder) SetInstrumentOptions(iopts interface{}) *gomock.Call { 1382 mr.mock.ctrl.T.Helper() 1383 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetInstrumentOptions", reflect.TypeOf((*MockOptions)(nil).SetInstrumentOptions), iopts) 1384 } 1385 1386 // SetIsMirrored mocks base method. 1387 func (m_2 *MockOptions) SetIsMirrored(m bool) Options { 1388 m_2.ctrl.T.Helper() 1389 ret := m_2.ctrl.Call(m_2, "SetIsMirrored", m) 1390 ret0, _ := ret[0].(Options) 1391 return ret0 1392 } 1393 1394 // SetIsMirrored indicates an expected call of SetIsMirrored. 1395 func (mr *MockOptionsMockRecorder) SetIsMirrored(m interface{}) *gomock.Call { 1396 mr.mock.ctrl.T.Helper() 1397 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsMirrored", reflect.TypeOf((*MockOptions)(nil).SetIsMirrored), m) 1398 } 1399 1400 // SetIsShardCutoffFn mocks base method. 1401 func (m *MockOptions) SetIsShardCutoffFn(fn ShardValidateFn) Options { 1402 m.ctrl.T.Helper() 1403 ret := m.ctrl.Call(m, "SetIsShardCutoffFn", fn) 1404 ret0, _ := ret[0].(Options) 1405 return ret0 1406 } 1407 1408 // SetIsShardCutoffFn indicates an expected call of SetIsShardCutoffFn. 1409 func (mr *MockOptionsMockRecorder) SetIsShardCutoffFn(fn interface{}) *gomock.Call { 1410 mr.mock.ctrl.T.Helper() 1411 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsShardCutoffFn", reflect.TypeOf((*MockOptions)(nil).SetIsShardCutoffFn), fn) 1412 } 1413 1414 // SetIsShardCutoverFn mocks base method. 1415 func (m *MockOptions) SetIsShardCutoverFn(fn ShardValidateFn) Options { 1416 m.ctrl.T.Helper() 1417 ret := m.ctrl.Call(m, "SetIsShardCutoverFn", fn) 1418 ret0, _ := ret[0].(Options) 1419 return ret0 1420 } 1421 1422 // SetIsShardCutoverFn indicates an expected call of SetIsShardCutoverFn. 1423 func (mr *MockOptionsMockRecorder) SetIsShardCutoverFn(fn interface{}) *gomock.Call { 1424 mr.mock.ctrl.T.Helper() 1425 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsShardCutoverFn", reflect.TypeOf((*MockOptions)(nil).SetIsShardCutoverFn), fn) 1426 } 1427 1428 // SetIsSharded mocks base method. 1429 func (m *MockOptions) SetIsSharded(sharded bool) Options { 1430 m.ctrl.T.Helper() 1431 ret := m.ctrl.Call(m, "SetIsSharded", sharded) 1432 ret0, _ := ret[0].(Options) 1433 return ret0 1434 } 1435 1436 // SetIsSharded indicates an expected call of SetIsSharded. 1437 func (mr *MockOptionsMockRecorder) SetIsSharded(sharded interface{}) *gomock.Call { 1438 mr.mock.ctrl.T.Helper() 1439 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsSharded", reflect.TypeOf((*MockOptions)(nil).SetIsSharded), sharded) 1440 } 1441 1442 // SetIsStaged mocks base method. 1443 func (m *MockOptions) SetIsStaged(v bool) Options { 1444 m.ctrl.T.Helper() 1445 ret := m.ctrl.Call(m, "SetIsStaged", v) 1446 ret0, _ := ret[0].(Options) 1447 return ret0 1448 } 1449 1450 // SetIsStaged indicates an expected call of SetIsStaged. 1451 func (mr *MockOptionsMockRecorder) SetIsStaged(v interface{}) *gomock.Call { 1452 mr.mock.ctrl.T.Helper() 1453 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIsStaged", reflect.TypeOf((*MockOptions)(nil).SetIsStaged), v) 1454 } 1455 1456 // SetNowFn mocks base method. 1457 func (m *MockOptions) SetNowFn(fn clock.NowFn) Options { 1458 m.ctrl.T.Helper() 1459 ret := m.ctrl.Call(m, "SetNowFn", fn) 1460 ret0, _ := ret[0].(Options) 1461 return ret0 1462 } 1463 1464 // SetNowFn indicates an expected call of SetNowFn. 1465 func (mr *MockOptionsMockRecorder) SetNowFn(fn interface{}) *gomock.Call { 1466 mr.mock.ctrl.T.Helper() 1467 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetNowFn", reflect.TypeOf((*MockOptions)(nil).SetNowFn), fn) 1468 } 1469 1470 // SetPlacementCutoverNanosFn mocks base method. 1471 func (m *MockOptions) SetPlacementCutoverNanosFn(fn TimeNanosFn) Options { 1472 m.ctrl.T.Helper() 1473 ret := m.ctrl.Call(m, "SetPlacementCutoverNanosFn", fn) 1474 ret0, _ := ret[0].(Options) 1475 return ret0 1476 } 1477 1478 // SetPlacementCutoverNanosFn indicates an expected call of SetPlacementCutoverNanosFn. 1479 func (mr *MockOptionsMockRecorder) SetPlacementCutoverNanosFn(fn interface{}) *gomock.Call { 1480 mr.mock.ctrl.T.Helper() 1481 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPlacementCutoverNanosFn", reflect.TypeOf((*MockOptions)(nil).SetPlacementCutoverNanosFn), fn) 1482 } 1483 1484 // SetShardCutoffNanosFn mocks base method. 1485 func (m *MockOptions) SetShardCutoffNanosFn(fn TimeNanosFn) Options { 1486 m.ctrl.T.Helper() 1487 ret := m.ctrl.Call(m, "SetShardCutoffNanosFn", fn) 1488 ret0, _ := ret[0].(Options) 1489 return ret0 1490 } 1491 1492 // SetShardCutoffNanosFn indicates an expected call of SetShardCutoffNanosFn. 1493 func (mr *MockOptionsMockRecorder) SetShardCutoffNanosFn(fn interface{}) *gomock.Call { 1494 mr.mock.ctrl.T.Helper() 1495 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShardCutoffNanosFn", reflect.TypeOf((*MockOptions)(nil).SetShardCutoffNanosFn), fn) 1496 } 1497 1498 // SetShardCutoverNanosFn mocks base method. 1499 func (m *MockOptions) SetShardCutoverNanosFn(fn TimeNanosFn) Options { 1500 m.ctrl.T.Helper() 1501 ret := m.ctrl.Call(m, "SetShardCutoverNanosFn", fn) 1502 ret0, _ := ret[0].(Options) 1503 return ret0 1504 } 1505 1506 // SetShardCutoverNanosFn indicates an expected call of SetShardCutoverNanosFn. 1507 func (mr *MockOptionsMockRecorder) SetShardCutoverNanosFn(fn interface{}) *gomock.Call { 1508 mr.mock.ctrl.T.Helper() 1509 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShardCutoverNanosFn", reflect.TypeOf((*MockOptions)(nil).SetShardCutoverNanosFn), fn) 1510 } 1511 1512 // SetShardStateMode mocks base method. 1513 func (m *MockOptions) SetShardStateMode(value ShardStateMode) Options { 1514 m.ctrl.T.Helper() 1515 ret := m.ctrl.Call(m, "SetShardStateMode", value) 1516 ret0, _ := ret[0].(Options) 1517 return ret0 1518 } 1519 1520 // SetShardStateMode indicates an expected call of SetShardStateMode. 1521 func (mr *MockOptionsMockRecorder) SetShardStateMode(value interface{}) *gomock.Call { 1522 mr.mock.ctrl.T.Helper() 1523 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetShardStateMode", reflect.TypeOf((*MockOptions)(nil).SetShardStateMode), value) 1524 } 1525 1526 // SetSkipPortMirroring mocks base method. 1527 func (m *MockOptions) SetSkipPortMirroring(v bool) Options { 1528 m.ctrl.T.Helper() 1529 ret := m.ctrl.Call(m, "SetSkipPortMirroring", v) 1530 ret0, _ := ret[0].(Options) 1531 return ret0 1532 } 1533 1534 // SetSkipPortMirroring indicates an expected call of SetSkipPortMirroring. 1535 func (mr *MockOptionsMockRecorder) SetSkipPortMirroring(v interface{}) *gomock.Call { 1536 mr.mock.ctrl.T.Helper() 1537 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSkipPortMirroring", reflect.TypeOf((*MockOptions)(nil).SetSkipPortMirroring), v) 1538 } 1539 1540 // SetValidZone mocks base method. 1541 func (m *MockOptions) SetValidZone(z string) Options { 1542 m.ctrl.T.Helper() 1543 ret := m.ctrl.Call(m, "SetValidZone", z) 1544 ret0, _ := ret[0].(Options) 1545 return ret0 1546 } 1547 1548 // SetValidZone indicates an expected call of SetValidZone. 1549 func (mr *MockOptionsMockRecorder) SetValidZone(z interface{}) *gomock.Call { 1550 mr.mock.ctrl.T.Helper() 1551 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidZone", reflect.TypeOf((*MockOptions)(nil).SetValidZone), z) 1552 } 1553 1554 // SetValidateFnBeforeUpdate mocks base method. 1555 func (m *MockOptions) SetValidateFnBeforeUpdate(fn ValidateFn) Options { 1556 m.ctrl.T.Helper() 1557 ret := m.ctrl.Call(m, "SetValidateFnBeforeUpdate", fn) 1558 ret0, _ := ret[0].(Options) 1559 return ret0 1560 } 1561 1562 // SetValidateFnBeforeUpdate indicates an expected call of SetValidateFnBeforeUpdate. 1563 func (mr *MockOptionsMockRecorder) SetValidateFnBeforeUpdate(fn interface{}) *gomock.Call { 1564 mr.mock.ctrl.T.Helper() 1565 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetValidateFnBeforeUpdate", reflect.TypeOf((*MockOptions)(nil).SetValidateFnBeforeUpdate), fn) 1566 } 1567 1568 // ShardCutoffNanosFn mocks base method. 1569 func (m *MockOptions) ShardCutoffNanosFn() TimeNanosFn { 1570 m.ctrl.T.Helper() 1571 ret := m.ctrl.Call(m, "ShardCutoffNanosFn") 1572 ret0, _ := ret[0].(TimeNanosFn) 1573 return ret0 1574 } 1575 1576 // ShardCutoffNanosFn indicates an expected call of ShardCutoffNanosFn. 1577 func (mr *MockOptionsMockRecorder) ShardCutoffNanosFn() *gomock.Call { 1578 mr.mock.ctrl.T.Helper() 1579 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardCutoffNanosFn", reflect.TypeOf((*MockOptions)(nil).ShardCutoffNanosFn)) 1580 } 1581 1582 // ShardCutoverNanosFn mocks base method. 1583 func (m *MockOptions) ShardCutoverNanosFn() TimeNanosFn { 1584 m.ctrl.T.Helper() 1585 ret := m.ctrl.Call(m, "ShardCutoverNanosFn") 1586 ret0, _ := ret[0].(TimeNanosFn) 1587 return ret0 1588 } 1589 1590 // ShardCutoverNanosFn indicates an expected call of ShardCutoverNanosFn. 1591 func (mr *MockOptionsMockRecorder) ShardCutoverNanosFn() *gomock.Call { 1592 mr.mock.ctrl.T.Helper() 1593 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardCutoverNanosFn", reflect.TypeOf((*MockOptions)(nil).ShardCutoverNanosFn)) 1594 } 1595 1596 // ShardStateMode mocks base method. 1597 func (m *MockOptions) ShardStateMode() ShardStateMode { 1598 m.ctrl.T.Helper() 1599 ret := m.ctrl.Call(m, "ShardStateMode") 1600 ret0, _ := ret[0].(ShardStateMode) 1601 return ret0 1602 } 1603 1604 // ShardStateMode indicates an expected call of ShardStateMode. 1605 func (mr *MockOptionsMockRecorder) ShardStateMode() *gomock.Call { 1606 mr.mock.ctrl.T.Helper() 1607 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShardStateMode", reflect.TypeOf((*MockOptions)(nil).ShardStateMode)) 1608 } 1609 1610 // SkipPortMirroring mocks base method. 1611 func (m *MockOptions) SkipPortMirroring() bool { 1612 m.ctrl.T.Helper() 1613 ret := m.ctrl.Call(m, "SkipPortMirroring") 1614 ret0, _ := ret[0].(bool) 1615 return ret0 1616 } 1617 1618 // SkipPortMirroring indicates an expected call of SkipPortMirroring. 1619 func (mr *MockOptionsMockRecorder) SkipPortMirroring() *gomock.Call { 1620 mr.mock.ctrl.T.Helper() 1621 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SkipPortMirroring", reflect.TypeOf((*MockOptions)(nil).SkipPortMirroring)) 1622 } 1623 1624 // ValidZone mocks base method. 1625 func (m *MockOptions) ValidZone() string { 1626 m.ctrl.T.Helper() 1627 ret := m.ctrl.Call(m, "ValidZone") 1628 ret0, _ := ret[0].(string) 1629 return ret0 1630 } 1631 1632 // ValidZone indicates an expected call of ValidZone. 1633 func (mr *MockOptionsMockRecorder) ValidZone() *gomock.Call { 1634 mr.mock.ctrl.T.Helper() 1635 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidZone", reflect.TypeOf((*MockOptions)(nil).ValidZone)) 1636 } 1637 1638 // ValidateFnBeforeUpdate mocks base method. 1639 func (m *MockOptions) ValidateFnBeforeUpdate() ValidateFn { 1640 m.ctrl.T.Helper() 1641 ret := m.ctrl.Call(m, "ValidateFnBeforeUpdate") 1642 ret0, _ := ret[0].(ValidateFn) 1643 return ret0 1644 } 1645 1646 // ValidateFnBeforeUpdate indicates an expected call of ValidateFnBeforeUpdate. 1647 func (mr *MockOptionsMockRecorder) ValidateFnBeforeUpdate() *gomock.Call { 1648 mr.mock.ctrl.T.Helper() 1649 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateFnBeforeUpdate", reflect.TypeOf((*MockOptions)(nil).ValidateFnBeforeUpdate)) 1650 } 1651 1652 // MockStorage is a mock of Storage interface. 1653 type MockStorage struct { 1654 ctrl *gomock.Controller 1655 recorder *MockStorageMockRecorder 1656 } 1657 1658 // MockStorageMockRecorder is the mock recorder for MockStorage. 1659 type MockStorageMockRecorder struct { 1660 mock *MockStorage 1661 } 1662 1663 // NewMockStorage creates a new mock instance. 1664 func NewMockStorage(ctrl *gomock.Controller) *MockStorage { 1665 mock := &MockStorage{ctrl: ctrl} 1666 mock.recorder = &MockStorageMockRecorder{mock} 1667 return mock 1668 } 1669 1670 // EXPECT returns an object that allows the caller to indicate expected use. 1671 func (m *MockStorage) EXPECT() *MockStorageMockRecorder { 1672 return m.recorder 1673 } 1674 1675 // CheckAndSet mocks base method. 1676 func (m *MockStorage) CheckAndSet(p Placement, version int) (Placement, error) { 1677 m.ctrl.T.Helper() 1678 ret := m.ctrl.Call(m, "CheckAndSet", p, version) 1679 ret0, _ := ret[0].(Placement) 1680 ret1, _ := ret[1].(error) 1681 return ret0, ret1 1682 } 1683 1684 // CheckAndSet indicates an expected call of CheckAndSet. 1685 func (mr *MockStorageMockRecorder) CheckAndSet(p, version interface{}) *gomock.Call { 1686 mr.mock.ctrl.T.Helper() 1687 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndSet", reflect.TypeOf((*MockStorage)(nil).CheckAndSet), p, version) 1688 } 1689 1690 // CheckAndSetProto mocks base method. 1691 func (m *MockStorage) CheckAndSetProto(p proto.Message, version int) (int, error) { 1692 m.ctrl.T.Helper() 1693 ret := m.ctrl.Call(m, "CheckAndSetProto", p, version) 1694 ret0, _ := ret[0].(int) 1695 ret1, _ := ret[1].(error) 1696 return ret0, ret1 1697 } 1698 1699 // CheckAndSetProto indicates an expected call of CheckAndSetProto. 1700 func (mr *MockStorageMockRecorder) CheckAndSetProto(p, version interface{}) *gomock.Call { 1701 mr.mock.ctrl.T.Helper() 1702 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndSetProto", reflect.TypeOf((*MockStorage)(nil).CheckAndSetProto), p, version) 1703 } 1704 1705 // Delete mocks base method. 1706 func (m *MockStorage) Delete() error { 1707 m.ctrl.T.Helper() 1708 ret := m.ctrl.Call(m, "Delete") 1709 ret0, _ := ret[0].(error) 1710 return ret0 1711 } 1712 1713 // Delete indicates an expected call of Delete. 1714 func (mr *MockStorageMockRecorder) Delete() *gomock.Call { 1715 mr.mock.ctrl.T.Helper() 1716 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete)) 1717 } 1718 1719 // Placement mocks base method. 1720 func (m *MockStorage) Placement() (Placement, error) { 1721 m.ctrl.T.Helper() 1722 ret := m.ctrl.Call(m, "Placement") 1723 ret0, _ := ret[0].(Placement) 1724 ret1, _ := ret[1].(error) 1725 return ret0, ret1 1726 } 1727 1728 // Placement indicates an expected call of Placement. 1729 func (mr *MockStorageMockRecorder) Placement() *gomock.Call { 1730 mr.mock.ctrl.T.Helper() 1731 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockStorage)(nil).Placement)) 1732 } 1733 1734 // PlacementForVersion mocks base method. 1735 func (m *MockStorage) PlacementForVersion(version int) (Placement, error) { 1736 m.ctrl.T.Helper() 1737 ret := m.ctrl.Call(m, "PlacementForVersion", version) 1738 ret0, _ := ret[0].(Placement) 1739 ret1, _ := ret[1].(error) 1740 return ret0, ret1 1741 } 1742 1743 // PlacementForVersion indicates an expected call of PlacementForVersion. 1744 func (mr *MockStorageMockRecorder) PlacementForVersion(version interface{}) *gomock.Call { 1745 mr.mock.ctrl.T.Helper() 1746 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PlacementForVersion", reflect.TypeOf((*MockStorage)(nil).PlacementForVersion), version) 1747 } 1748 1749 // Proto mocks base method. 1750 func (m *MockStorage) Proto() (proto.Message, int, error) { 1751 m.ctrl.T.Helper() 1752 ret := m.ctrl.Call(m, "Proto") 1753 ret0, _ := ret[0].(proto.Message) 1754 ret1, _ := ret[1].(int) 1755 ret2, _ := ret[2].(error) 1756 return ret0, ret1, ret2 1757 } 1758 1759 // Proto indicates an expected call of Proto. 1760 func (mr *MockStorageMockRecorder) Proto() *gomock.Call { 1761 mr.mock.ctrl.T.Helper() 1762 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proto", reflect.TypeOf((*MockStorage)(nil).Proto)) 1763 } 1764 1765 // Set mocks base method. 1766 func (m *MockStorage) Set(p Placement) (Placement, error) { 1767 m.ctrl.T.Helper() 1768 ret := m.ctrl.Call(m, "Set", p) 1769 ret0, _ := ret[0].(Placement) 1770 ret1, _ := ret[1].(error) 1771 return ret0, ret1 1772 } 1773 1774 // Set indicates an expected call of Set. 1775 func (mr *MockStorageMockRecorder) Set(p interface{}) *gomock.Call { 1776 mr.mock.ctrl.T.Helper() 1777 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockStorage)(nil).Set), p) 1778 } 1779 1780 // SetIfNotExist mocks base method. 1781 func (m *MockStorage) SetIfNotExist(p Placement) (Placement, error) { 1782 m.ctrl.T.Helper() 1783 ret := m.ctrl.Call(m, "SetIfNotExist", p) 1784 ret0, _ := ret[0].(Placement) 1785 ret1, _ := ret[1].(error) 1786 return ret0, ret1 1787 } 1788 1789 // SetIfNotExist indicates an expected call of SetIfNotExist. 1790 func (mr *MockStorageMockRecorder) SetIfNotExist(p interface{}) *gomock.Call { 1791 mr.mock.ctrl.T.Helper() 1792 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIfNotExist", reflect.TypeOf((*MockStorage)(nil).SetIfNotExist), p) 1793 } 1794 1795 // SetProto mocks base method. 1796 func (m *MockStorage) SetProto(p proto.Message) (int, error) { 1797 m.ctrl.T.Helper() 1798 ret := m.ctrl.Call(m, "SetProto", p) 1799 ret0, _ := ret[0].(int) 1800 ret1, _ := ret[1].(error) 1801 return ret0, ret1 1802 } 1803 1804 // SetProto indicates an expected call of SetProto. 1805 func (mr *MockStorageMockRecorder) SetProto(p interface{}) *gomock.Call { 1806 mr.mock.ctrl.T.Helper() 1807 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProto", reflect.TypeOf((*MockStorage)(nil).SetProto), p) 1808 } 1809 1810 // Watch mocks base method. 1811 func (m *MockStorage) Watch() (Watch, error) { 1812 m.ctrl.T.Helper() 1813 ret := m.ctrl.Call(m, "Watch") 1814 ret0, _ := ret[0].(Watch) 1815 ret1, _ := ret[1].(error) 1816 return ret0, ret1 1817 } 1818 1819 // Watch indicates an expected call of Watch. 1820 func (mr *MockStorageMockRecorder) Watch() *gomock.Call { 1821 mr.mock.ctrl.T.Helper() 1822 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockStorage)(nil).Watch)) 1823 } 1824 1825 // MockService is a mock of Service interface. 1826 type MockService struct { 1827 ctrl *gomock.Controller 1828 recorder *MockServiceMockRecorder 1829 } 1830 1831 // MockServiceMockRecorder is the mock recorder for MockService. 1832 type MockServiceMockRecorder struct { 1833 mock *MockService 1834 } 1835 1836 // NewMockService creates a new mock instance. 1837 func NewMockService(ctrl *gomock.Controller) *MockService { 1838 mock := &MockService{ctrl: ctrl} 1839 mock.recorder = &MockServiceMockRecorder{mock} 1840 return mock 1841 } 1842 1843 // EXPECT returns an object that allows the caller to indicate expected use. 1844 func (m *MockService) EXPECT() *MockServiceMockRecorder { 1845 return m.recorder 1846 } 1847 1848 // AddInstances mocks base method. 1849 func (m *MockService) AddInstances(candidates []Instance) (Placement, []Instance, error) { 1850 m.ctrl.T.Helper() 1851 ret := m.ctrl.Call(m, "AddInstances", candidates) 1852 ret0, _ := ret[0].(Placement) 1853 ret1, _ := ret[1].([]Instance) 1854 ret2, _ := ret[2].(error) 1855 return ret0, ret1, ret2 1856 } 1857 1858 // AddInstances indicates an expected call of AddInstances. 1859 func (mr *MockServiceMockRecorder) AddInstances(candidates interface{}) *gomock.Call { 1860 mr.mock.ctrl.T.Helper() 1861 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddInstances", reflect.TypeOf((*MockService)(nil).AddInstances), candidates) 1862 } 1863 1864 // AddReplica mocks base method. 1865 func (m *MockService) AddReplica() (Placement, error) { 1866 m.ctrl.T.Helper() 1867 ret := m.ctrl.Call(m, "AddReplica") 1868 ret0, _ := ret[0].(Placement) 1869 ret1, _ := ret[1].(error) 1870 return ret0, ret1 1871 } 1872 1873 // AddReplica indicates an expected call of AddReplica. 1874 func (mr *MockServiceMockRecorder) AddReplica() *gomock.Call { 1875 mr.mock.ctrl.T.Helper() 1876 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReplica", reflect.TypeOf((*MockService)(nil).AddReplica)) 1877 } 1878 1879 // BalanceShards mocks base method. 1880 func (m *MockService) BalanceShards() (Placement, error) { 1881 m.ctrl.T.Helper() 1882 ret := m.ctrl.Call(m, "BalanceShards") 1883 ret0, _ := ret[0].(Placement) 1884 ret1, _ := ret[1].(error) 1885 return ret0, ret1 1886 } 1887 1888 // BalanceShards indicates an expected call of BalanceShards. 1889 func (mr *MockServiceMockRecorder) BalanceShards() *gomock.Call { 1890 mr.mock.ctrl.T.Helper() 1891 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BalanceShards", reflect.TypeOf((*MockService)(nil).BalanceShards)) 1892 } 1893 1894 // BuildInitialPlacement mocks base method. 1895 func (m *MockService) BuildInitialPlacement(instances []Instance, numShards, rf int) (Placement, error) { 1896 m.ctrl.T.Helper() 1897 ret := m.ctrl.Call(m, "BuildInitialPlacement", instances, numShards, rf) 1898 ret0, _ := ret[0].(Placement) 1899 ret1, _ := ret[1].(error) 1900 return ret0, ret1 1901 } 1902 1903 // BuildInitialPlacement indicates an expected call of BuildInitialPlacement. 1904 func (mr *MockServiceMockRecorder) BuildInitialPlacement(instances, numShards, rf interface{}) *gomock.Call { 1905 mr.mock.ctrl.T.Helper() 1906 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildInitialPlacement", reflect.TypeOf((*MockService)(nil).BuildInitialPlacement), instances, numShards, rf) 1907 } 1908 1909 // CheckAndSet mocks base method. 1910 func (m *MockService) CheckAndSet(p Placement, version int) (Placement, error) { 1911 m.ctrl.T.Helper() 1912 ret := m.ctrl.Call(m, "CheckAndSet", p, version) 1913 ret0, _ := ret[0].(Placement) 1914 ret1, _ := ret[1].(error) 1915 return ret0, ret1 1916 } 1917 1918 // CheckAndSet indicates an expected call of CheckAndSet. 1919 func (mr *MockServiceMockRecorder) CheckAndSet(p, version interface{}) *gomock.Call { 1920 mr.mock.ctrl.T.Helper() 1921 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndSet", reflect.TypeOf((*MockService)(nil).CheckAndSet), p, version) 1922 } 1923 1924 // CheckAndSetProto mocks base method. 1925 func (m *MockService) CheckAndSetProto(p proto.Message, version int) (int, error) { 1926 m.ctrl.T.Helper() 1927 ret := m.ctrl.Call(m, "CheckAndSetProto", p, version) 1928 ret0, _ := ret[0].(int) 1929 ret1, _ := ret[1].(error) 1930 return ret0, ret1 1931 } 1932 1933 // CheckAndSetProto indicates an expected call of CheckAndSetProto. 1934 func (mr *MockServiceMockRecorder) CheckAndSetProto(p, version interface{}) *gomock.Call { 1935 mr.mock.ctrl.T.Helper() 1936 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndSetProto", reflect.TypeOf((*MockService)(nil).CheckAndSetProto), p, version) 1937 } 1938 1939 // Delete mocks base method. 1940 func (m *MockService) Delete() error { 1941 m.ctrl.T.Helper() 1942 ret := m.ctrl.Call(m, "Delete") 1943 ret0, _ := ret[0].(error) 1944 return ret0 1945 } 1946 1947 // Delete indicates an expected call of Delete. 1948 func (mr *MockServiceMockRecorder) Delete() *gomock.Call { 1949 mr.mock.ctrl.T.Helper() 1950 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockService)(nil).Delete)) 1951 } 1952 1953 // MarkAllShardsAvailable mocks base method. 1954 func (m *MockService) MarkAllShardsAvailable() (Placement, error) { 1955 m.ctrl.T.Helper() 1956 ret := m.ctrl.Call(m, "MarkAllShardsAvailable") 1957 ret0, _ := ret[0].(Placement) 1958 ret1, _ := ret[1].(error) 1959 return ret0, ret1 1960 } 1961 1962 // MarkAllShardsAvailable indicates an expected call of MarkAllShardsAvailable. 1963 func (mr *MockServiceMockRecorder) MarkAllShardsAvailable() *gomock.Call { 1964 mr.mock.ctrl.T.Helper() 1965 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkAllShardsAvailable", reflect.TypeOf((*MockService)(nil).MarkAllShardsAvailable)) 1966 } 1967 1968 // MarkInstanceAvailable mocks base method. 1969 func (m *MockService) MarkInstanceAvailable(instanceID string) (Placement, error) { 1970 m.ctrl.T.Helper() 1971 ret := m.ctrl.Call(m, "MarkInstanceAvailable", instanceID) 1972 ret0, _ := ret[0].(Placement) 1973 ret1, _ := ret[1].(error) 1974 return ret0, ret1 1975 } 1976 1977 // MarkInstanceAvailable indicates an expected call of MarkInstanceAvailable. 1978 func (mr *MockServiceMockRecorder) MarkInstanceAvailable(instanceID interface{}) *gomock.Call { 1979 mr.mock.ctrl.T.Helper() 1980 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkInstanceAvailable", reflect.TypeOf((*MockService)(nil).MarkInstanceAvailable), instanceID) 1981 } 1982 1983 // MarkShardsAvailable mocks base method. 1984 func (m *MockService) MarkShardsAvailable(instanceID string, shardIDs ...uint32) (Placement, error) { 1985 m.ctrl.T.Helper() 1986 varargs := []interface{}{instanceID} 1987 for _, a := range shardIDs { 1988 varargs = append(varargs, a) 1989 } 1990 ret := m.ctrl.Call(m, "MarkShardsAvailable", varargs...) 1991 ret0, _ := ret[0].(Placement) 1992 ret1, _ := ret[1].(error) 1993 return ret0, ret1 1994 } 1995 1996 // MarkShardsAvailable indicates an expected call of MarkShardsAvailable. 1997 func (mr *MockServiceMockRecorder) MarkShardsAvailable(instanceID interface{}, shardIDs ...interface{}) *gomock.Call { 1998 mr.mock.ctrl.T.Helper() 1999 varargs := append([]interface{}{instanceID}, shardIDs...) 2000 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkShardsAvailable", reflect.TypeOf((*MockService)(nil).MarkShardsAvailable), varargs...) 2001 } 2002 2003 // Placement mocks base method. 2004 func (m *MockService) Placement() (Placement, error) { 2005 m.ctrl.T.Helper() 2006 ret := m.ctrl.Call(m, "Placement") 2007 ret0, _ := ret[0].(Placement) 2008 ret1, _ := ret[1].(error) 2009 return ret0, ret1 2010 } 2011 2012 // Placement indicates an expected call of Placement. 2013 func (mr *MockServiceMockRecorder) Placement() *gomock.Call { 2014 mr.mock.ctrl.T.Helper() 2015 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockService)(nil).Placement)) 2016 } 2017 2018 // PlacementForVersion mocks base method. 2019 func (m *MockService) PlacementForVersion(version int) (Placement, error) { 2020 m.ctrl.T.Helper() 2021 ret := m.ctrl.Call(m, "PlacementForVersion", version) 2022 ret0, _ := ret[0].(Placement) 2023 ret1, _ := ret[1].(error) 2024 return ret0, ret1 2025 } 2026 2027 // PlacementForVersion indicates an expected call of PlacementForVersion. 2028 func (mr *MockServiceMockRecorder) PlacementForVersion(version interface{}) *gomock.Call { 2029 mr.mock.ctrl.T.Helper() 2030 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PlacementForVersion", reflect.TypeOf((*MockService)(nil).PlacementForVersion), version) 2031 } 2032 2033 // Proto mocks base method. 2034 func (m *MockService) Proto() (proto.Message, int, error) { 2035 m.ctrl.T.Helper() 2036 ret := m.ctrl.Call(m, "Proto") 2037 ret0, _ := ret[0].(proto.Message) 2038 ret1, _ := ret[1].(int) 2039 ret2, _ := ret[2].(error) 2040 return ret0, ret1, ret2 2041 } 2042 2043 // Proto indicates an expected call of Proto. 2044 func (mr *MockServiceMockRecorder) Proto() *gomock.Call { 2045 mr.mock.ctrl.T.Helper() 2046 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Proto", reflect.TypeOf((*MockService)(nil).Proto)) 2047 } 2048 2049 // RemoveInstances mocks base method. 2050 func (m *MockService) RemoveInstances(leavingInstanceIDs []string) (Placement, error) { 2051 m.ctrl.T.Helper() 2052 ret := m.ctrl.Call(m, "RemoveInstances", leavingInstanceIDs) 2053 ret0, _ := ret[0].(Placement) 2054 ret1, _ := ret[1].(error) 2055 return ret0, ret1 2056 } 2057 2058 // RemoveInstances indicates an expected call of RemoveInstances. 2059 func (mr *MockServiceMockRecorder) RemoveInstances(leavingInstanceIDs interface{}) *gomock.Call { 2060 mr.mock.ctrl.T.Helper() 2061 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveInstances", reflect.TypeOf((*MockService)(nil).RemoveInstances), leavingInstanceIDs) 2062 } 2063 2064 // ReplaceInstances mocks base method. 2065 func (m *MockService) ReplaceInstances(leavingInstanceIDs []string, candidates []Instance) (Placement, []Instance, error) { 2066 m.ctrl.T.Helper() 2067 ret := m.ctrl.Call(m, "ReplaceInstances", leavingInstanceIDs, candidates) 2068 ret0, _ := ret[0].(Placement) 2069 ret1, _ := ret[1].([]Instance) 2070 ret2, _ := ret[2].(error) 2071 return ret0, ret1, ret2 2072 } 2073 2074 // ReplaceInstances indicates an expected call of ReplaceInstances. 2075 func (mr *MockServiceMockRecorder) ReplaceInstances(leavingInstanceIDs, candidates interface{}) *gomock.Call { 2076 mr.mock.ctrl.T.Helper() 2077 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceInstances", reflect.TypeOf((*MockService)(nil).ReplaceInstances), leavingInstanceIDs, candidates) 2078 } 2079 2080 // Set mocks base method. 2081 func (m *MockService) Set(p Placement) (Placement, error) { 2082 m.ctrl.T.Helper() 2083 ret := m.ctrl.Call(m, "Set", p) 2084 ret0, _ := ret[0].(Placement) 2085 ret1, _ := ret[1].(error) 2086 return ret0, ret1 2087 } 2088 2089 // Set indicates an expected call of Set. 2090 func (mr *MockServiceMockRecorder) Set(p interface{}) *gomock.Call { 2091 mr.mock.ctrl.T.Helper() 2092 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockService)(nil).Set), p) 2093 } 2094 2095 // SetIfNotExist mocks base method. 2096 func (m *MockService) SetIfNotExist(p Placement) (Placement, error) { 2097 m.ctrl.T.Helper() 2098 ret := m.ctrl.Call(m, "SetIfNotExist", p) 2099 ret0, _ := ret[0].(Placement) 2100 ret1, _ := ret[1].(error) 2101 return ret0, ret1 2102 } 2103 2104 // SetIfNotExist indicates an expected call of SetIfNotExist. 2105 func (mr *MockServiceMockRecorder) SetIfNotExist(p interface{}) *gomock.Call { 2106 mr.mock.ctrl.T.Helper() 2107 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIfNotExist", reflect.TypeOf((*MockService)(nil).SetIfNotExist), p) 2108 } 2109 2110 // SetProto mocks base method. 2111 func (m *MockService) SetProto(p proto.Message) (int, error) { 2112 m.ctrl.T.Helper() 2113 ret := m.ctrl.Call(m, "SetProto", p) 2114 ret0, _ := ret[0].(int) 2115 ret1, _ := ret[1].(error) 2116 return ret0, ret1 2117 } 2118 2119 // SetProto indicates an expected call of SetProto. 2120 func (mr *MockServiceMockRecorder) SetProto(p interface{}) *gomock.Call { 2121 mr.mock.ctrl.T.Helper() 2122 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProto", reflect.TypeOf((*MockService)(nil).SetProto), p) 2123 } 2124 2125 // Watch mocks base method. 2126 func (m *MockService) Watch() (Watch, error) { 2127 m.ctrl.T.Helper() 2128 ret := m.ctrl.Call(m, "Watch") 2129 ret0, _ := ret[0].(Watch) 2130 ret1, _ := ret[1].(error) 2131 return ret0, ret1 2132 } 2133 2134 // Watch indicates an expected call of Watch. 2135 func (mr *MockServiceMockRecorder) Watch() *gomock.Call { 2136 mr.mock.ctrl.T.Helper() 2137 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Watch", reflect.TypeOf((*MockService)(nil).Watch)) 2138 } 2139 2140 // MockOperator is a mock of Operator interface. 2141 type MockOperator struct { 2142 ctrl *gomock.Controller 2143 recorder *MockOperatorMockRecorder 2144 } 2145 2146 // MockOperatorMockRecorder is the mock recorder for MockOperator. 2147 type MockOperatorMockRecorder struct { 2148 mock *MockOperator 2149 } 2150 2151 // NewMockOperator creates a new mock instance. 2152 func NewMockOperator(ctrl *gomock.Controller) *MockOperator { 2153 mock := &MockOperator{ctrl: ctrl} 2154 mock.recorder = &MockOperatorMockRecorder{mock} 2155 return mock 2156 } 2157 2158 // EXPECT returns an object that allows the caller to indicate expected use. 2159 func (m *MockOperator) EXPECT() *MockOperatorMockRecorder { 2160 return m.recorder 2161 } 2162 2163 // AddInstances mocks base method. 2164 func (m *MockOperator) AddInstances(candidates []Instance) (Placement, []Instance, error) { 2165 m.ctrl.T.Helper() 2166 ret := m.ctrl.Call(m, "AddInstances", candidates) 2167 ret0, _ := ret[0].(Placement) 2168 ret1, _ := ret[1].([]Instance) 2169 ret2, _ := ret[2].(error) 2170 return ret0, ret1, ret2 2171 } 2172 2173 // AddInstances indicates an expected call of AddInstances. 2174 func (mr *MockOperatorMockRecorder) AddInstances(candidates interface{}) *gomock.Call { 2175 mr.mock.ctrl.T.Helper() 2176 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddInstances", reflect.TypeOf((*MockOperator)(nil).AddInstances), candidates) 2177 } 2178 2179 // AddReplica mocks base method. 2180 func (m *MockOperator) AddReplica() (Placement, error) { 2181 m.ctrl.T.Helper() 2182 ret := m.ctrl.Call(m, "AddReplica") 2183 ret0, _ := ret[0].(Placement) 2184 ret1, _ := ret[1].(error) 2185 return ret0, ret1 2186 } 2187 2188 // AddReplica indicates an expected call of AddReplica. 2189 func (mr *MockOperatorMockRecorder) AddReplica() *gomock.Call { 2190 mr.mock.ctrl.T.Helper() 2191 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReplica", reflect.TypeOf((*MockOperator)(nil).AddReplica)) 2192 } 2193 2194 // BalanceShards mocks base method. 2195 func (m *MockOperator) BalanceShards() (Placement, error) { 2196 m.ctrl.T.Helper() 2197 ret := m.ctrl.Call(m, "BalanceShards") 2198 ret0, _ := ret[0].(Placement) 2199 ret1, _ := ret[1].(error) 2200 return ret0, ret1 2201 } 2202 2203 // BalanceShards indicates an expected call of BalanceShards. 2204 func (mr *MockOperatorMockRecorder) BalanceShards() *gomock.Call { 2205 mr.mock.ctrl.T.Helper() 2206 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BalanceShards", reflect.TypeOf((*MockOperator)(nil).BalanceShards)) 2207 } 2208 2209 // BuildInitialPlacement mocks base method. 2210 func (m *MockOperator) BuildInitialPlacement(instances []Instance, numShards, rf int) (Placement, error) { 2211 m.ctrl.T.Helper() 2212 ret := m.ctrl.Call(m, "BuildInitialPlacement", instances, numShards, rf) 2213 ret0, _ := ret[0].(Placement) 2214 ret1, _ := ret[1].(error) 2215 return ret0, ret1 2216 } 2217 2218 // BuildInitialPlacement indicates an expected call of BuildInitialPlacement. 2219 func (mr *MockOperatorMockRecorder) BuildInitialPlacement(instances, numShards, rf interface{}) *gomock.Call { 2220 mr.mock.ctrl.T.Helper() 2221 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildInitialPlacement", reflect.TypeOf((*MockOperator)(nil).BuildInitialPlacement), instances, numShards, rf) 2222 } 2223 2224 // MarkAllShardsAvailable mocks base method. 2225 func (m *MockOperator) MarkAllShardsAvailable() (Placement, error) { 2226 m.ctrl.T.Helper() 2227 ret := m.ctrl.Call(m, "MarkAllShardsAvailable") 2228 ret0, _ := ret[0].(Placement) 2229 ret1, _ := ret[1].(error) 2230 return ret0, ret1 2231 } 2232 2233 // MarkAllShardsAvailable indicates an expected call of MarkAllShardsAvailable. 2234 func (mr *MockOperatorMockRecorder) MarkAllShardsAvailable() *gomock.Call { 2235 mr.mock.ctrl.T.Helper() 2236 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkAllShardsAvailable", reflect.TypeOf((*MockOperator)(nil).MarkAllShardsAvailable)) 2237 } 2238 2239 // MarkInstanceAvailable mocks base method. 2240 func (m *MockOperator) MarkInstanceAvailable(instanceID string) (Placement, error) { 2241 m.ctrl.T.Helper() 2242 ret := m.ctrl.Call(m, "MarkInstanceAvailable", instanceID) 2243 ret0, _ := ret[0].(Placement) 2244 ret1, _ := ret[1].(error) 2245 return ret0, ret1 2246 } 2247 2248 // MarkInstanceAvailable indicates an expected call of MarkInstanceAvailable. 2249 func (mr *MockOperatorMockRecorder) MarkInstanceAvailable(instanceID interface{}) *gomock.Call { 2250 mr.mock.ctrl.T.Helper() 2251 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkInstanceAvailable", reflect.TypeOf((*MockOperator)(nil).MarkInstanceAvailable), instanceID) 2252 } 2253 2254 // MarkShardsAvailable mocks base method. 2255 func (m *MockOperator) MarkShardsAvailable(instanceID string, shardIDs ...uint32) (Placement, error) { 2256 m.ctrl.T.Helper() 2257 varargs := []interface{}{instanceID} 2258 for _, a := range shardIDs { 2259 varargs = append(varargs, a) 2260 } 2261 ret := m.ctrl.Call(m, "MarkShardsAvailable", varargs...) 2262 ret0, _ := ret[0].(Placement) 2263 ret1, _ := ret[1].(error) 2264 return ret0, ret1 2265 } 2266 2267 // MarkShardsAvailable indicates an expected call of MarkShardsAvailable. 2268 func (mr *MockOperatorMockRecorder) MarkShardsAvailable(instanceID interface{}, shardIDs ...interface{}) *gomock.Call { 2269 mr.mock.ctrl.T.Helper() 2270 varargs := append([]interface{}{instanceID}, shardIDs...) 2271 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkShardsAvailable", reflect.TypeOf((*MockOperator)(nil).MarkShardsAvailable), varargs...) 2272 } 2273 2274 // Placement mocks base method. 2275 func (m *MockOperator) Placement() Placement { 2276 m.ctrl.T.Helper() 2277 ret := m.ctrl.Call(m, "Placement") 2278 ret0, _ := ret[0].(Placement) 2279 return ret0 2280 } 2281 2282 // Placement indicates an expected call of Placement. 2283 func (mr *MockOperatorMockRecorder) Placement() *gomock.Call { 2284 mr.mock.ctrl.T.Helper() 2285 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Placement", reflect.TypeOf((*MockOperator)(nil).Placement)) 2286 } 2287 2288 // RemoveInstances mocks base method. 2289 func (m *MockOperator) RemoveInstances(leavingInstanceIDs []string) (Placement, error) { 2290 m.ctrl.T.Helper() 2291 ret := m.ctrl.Call(m, "RemoveInstances", leavingInstanceIDs) 2292 ret0, _ := ret[0].(Placement) 2293 ret1, _ := ret[1].(error) 2294 return ret0, ret1 2295 } 2296 2297 // RemoveInstances indicates an expected call of RemoveInstances. 2298 func (mr *MockOperatorMockRecorder) RemoveInstances(leavingInstanceIDs interface{}) *gomock.Call { 2299 mr.mock.ctrl.T.Helper() 2300 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveInstances", reflect.TypeOf((*MockOperator)(nil).RemoveInstances), leavingInstanceIDs) 2301 } 2302 2303 // ReplaceInstances mocks base method. 2304 func (m *MockOperator) ReplaceInstances(leavingInstanceIDs []string, candidates []Instance) (Placement, []Instance, error) { 2305 m.ctrl.T.Helper() 2306 ret := m.ctrl.Call(m, "ReplaceInstances", leavingInstanceIDs, candidates) 2307 ret0, _ := ret[0].(Placement) 2308 ret1, _ := ret[1].([]Instance) 2309 ret2, _ := ret[2].(error) 2310 return ret0, ret1, ret2 2311 } 2312 2313 // ReplaceInstances indicates an expected call of ReplaceInstances. 2314 func (mr *MockOperatorMockRecorder) ReplaceInstances(leavingInstanceIDs, candidates interface{}) *gomock.Call { 2315 mr.mock.ctrl.T.Helper() 2316 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceInstances", reflect.TypeOf((*MockOperator)(nil).ReplaceInstances), leavingInstanceIDs, candidates) 2317 } 2318 2319 // Mockoperations is a mock of operations interface. 2320 type Mockoperations struct { 2321 ctrl *gomock.Controller 2322 recorder *MockoperationsMockRecorder 2323 } 2324 2325 // MockoperationsMockRecorder is the mock recorder for Mockoperations. 2326 type MockoperationsMockRecorder struct { 2327 mock *Mockoperations 2328 } 2329 2330 // NewMockoperations creates a new mock instance. 2331 func NewMockoperations(ctrl *gomock.Controller) *Mockoperations { 2332 mock := &Mockoperations{ctrl: ctrl} 2333 mock.recorder = &MockoperationsMockRecorder{mock} 2334 return mock 2335 } 2336 2337 // EXPECT returns an object that allows the caller to indicate expected use. 2338 func (m *Mockoperations) EXPECT() *MockoperationsMockRecorder { 2339 return m.recorder 2340 } 2341 2342 // AddInstances mocks base method. 2343 func (m *Mockoperations) AddInstances(candidates []Instance) (Placement, []Instance, error) { 2344 m.ctrl.T.Helper() 2345 ret := m.ctrl.Call(m, "AddInstances", candidates) 2346 ret0, _ := ret[0].(Placement) 2347 ret1, _ := ret[1].([]Instance) 2348 ret2, _ := ret[2].(error) 2349 return ret0, ret1, ret2 2350 } 2351 2352 // AddInstances indicates an expected call of AddInstances. 2353 func (mr *MockoperationsMockRecorder) AddInstances(candidates interface{}) *gomock.Call { 2354 mr.mock.ctrl.T.Helper() 2355 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddInstances", reflect.TypeOf((*Mockoperations)(nil).AddInstances), candidates) 2356 } 2357 2358 // AddReplica mocks base method. 2359 func (m *Mockoperations) AddReplica() (Placement, error) { 2360 m.ctrl.T.Helper() 2361 ret := m.ctrl.Call(m, "AddReplica") 2362 ret0, _ := ret[0].(Placement) 2363 ret1, _ := ret[1].(error) 2364 return ret0, ret1 2365 } 2366 2367 // AddReplica indicates an expected call of AddReplica. 2368 func (mr *MockoperationsMockRecorder) AddReplica() *gomock.Call { 2369 mr.mock.ctrl.T.Helper() 2370 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReplica", reflect.TypeOf((*Mockoperations)(nil).AddReplica)) 2371 } 2372 2373 // BalanceShards mocks base method. 2374 func (m *Mockoperations) BalanceShards() (Placement, error) { 2375 m.ctrl.T.Helper() 2376 ret := m.ctrl.Call(m, "BalanceShards") 2377 ret0, _ := ret[0].(Placement) 2378 ret1, _ := ret[1].(error) 2379 return ret0, ret1 2380 } 2381 2382 // BalanceShards indicates an expected call of BalanceShards. 2383 func (mr *MockoperationsMockRecorder) BalanceShards() *gomock.Call { 2384 mr.mock.ctrl.T.Helper() 2385 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BalanceShards", reflect.TypeOf((*Mockoperations)(nil).BalanceShards)) 2386 } 2387 2388 // BuildInitialPlacement mocks base method. 2389 func (m *Mockoperations) BuildInitialPlacement(instances []Instance, numShards, rf int) (Placement, error) { 2390 m.ctrl.T.Helper() 2391 ret := m.ctrl.Call(m, "BuildInitialPlacement", instances, numShards, rf) 2392 ret0, _ := ret[0].(Placement) 2393 ret1, _ := ret[1].(error) 2394 return ret0, ret1 2395 } 2396 2397 // BuildInitialPlacement indicates an expected call of BuildInitialPlacement. 2398 func (mr *MockoperationsMockRecorder) BuildInitialPlacement(instances, numShards, rf interface{}) *gomock.Call { 2399 mr.mock.ctrl.T.Helper() 2400 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildInitialPlacement", reflect.TypeOf((*Mockoperations)(nil).BuildInitialPlacement), instances, numShards, rf) 2401 } 2402 2403 // MarkAllShardsAvailable mocks base method. 2404 func (m *Mockoperations) MarkAllShardsAvailable() (Placement, error) { 2405 m.ctrl.T.Helper() 2406 ret := m.ctrl.Call(m, "MarkAllShardsAvailable") 2407 ret0, _ := ret[0].(Placement) 2408 ret1, _ := ret[1].(error) 2409 return ret0, ret1 2410 } 2411 2412 // MarkAllShardsAvailable indicates an expected call of MarkAllShardsAvailable. 2413 func (mr *MockoperationsMockRecorder) MarkAllShardsAvailable() *gomock.Call { 2414 mr.mock.ctrl.T.Helper() 2415 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkAllShardsAvailable", reflect.TypeOf((*Mockoperations)(nil).MarkAllShardsAvailable)) 2416 } 2417 2418 // MarkInstanceAvailable mocks base method. 2419 func (m *Mockoperations) MarkInstanceAvailable(instanceID string) (Placement, error) { 2420 m.ctrl.T.Helper() 2421 ret := m.ctrl.Call(m, "MarkInstanceAvailable", instanceID) 2422 ret0, _ := ret[0].(Placement) 2423 ret1, _ := ret[1].(error) 2424 return ret0, ret1 2425 } 2426 2427 // MarkInstanceAvailable indicates an expected call of MarkInstanceAvailable. 2428 func (mr *MockoperationsMockRecorder) MarkInstanceAvailable(instanceID interface{}) *gomock.Call { 2429 mr.mock.ctrl.T.Helper() 2430 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkInstanceAvailable", reflect.TypeOf((*Mockoperations)(nil).MarkInstanceAvailable), instanceID) 2431 } 2432 2433 // MarkShardsAvailable mocks base method. 2434 func (m *Mockoperations) MarkShardsAvailable(instanceID string, shardIDs ...uint32) (Placement, error) { 2435 m.ctrl.T.Helper() 2436 varargs := []interface{}{instanceID} 2437 for _, a := range shardIDs { 2438 varargs = append(varargs, a) 2439 } 2440 ret := m.ctrl.Call(m, "MarkShardsAvailable", varargs...) 2441 ret0, _ := ret[0].(Placement) 2442 ret1, _ := ret[1].(error) 2443 return ret0, ret1 2444 } 2445 2446 // MarkShardsAvailable indicates an expected call of MarkShardsAvailable. 2447 func (mr *MockoperationsMockRecorder) MarkShardsAvailable(instanceID interface{}, shardIDs ...interface{}) *gomock.Call { 2448 mr.mock.ctrl.T.Helper() 2449 varargs := append([]interface{}{instanceID}, shardIDs...) 2450 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkShardsAvailable", reflect.TypeOf((*Mockoperations)(nil).MarkShardsAvailable), varargs...) 2451 } 2452 2453 // RemoveInstances mocks base method. 2454 func (m *Mockoperations) RemoveInstances(leavingInstanceIDs []string) (Placement, error) { 2455 m.ctrl.T.Helper() 2456 ret := m.ctrl.Call(m, "RemoveInstances", leavingInstanceIDs) 2457 ret0, _ := ret[0].(Placement) 2458 ret1, _ := ret[1].(error) 2459 return ret0, ret1 2460 } 2461 2462 // RemoveInstances indicates an expected call of RemoveInstances. 2463 func (mr *MockoperationsMockRecorder) RemoveInstances(leavingInstanceIDs interface{}) *gomock.Call { 2464 mr.mock.ctrl.T.Helper() 2465 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveInstances", reflect.TypeOf((*Mockoperations)(nil).RemoveInstances), leavingInstanceIDs) 2466 } 2467 2468 // ReplaceInstances mocks base method. 2469 func (m *Mockoperations) ReplaceInstances(leavingInstanceIDs []string, candidates []Instance) (Placement, []Instance, error) { 2470 m.ctrl.T.Helper() 2471 ret := m.ctrl.Call(m, "ReplaceInstances", leavingInstanceIDs, candidates) 2472 ret0, _ := ret[0].(Placement) 2473 ret1, _ := ret[1].([]Instance) 2474 ret2, _ := ret[2].(error) 2475 return ret0, ret1, ret2 2476 } 2477 2478 // ReplaceInstances indicates an expected call of ReplaceInstances. 2479 func (mr *MockoperationsMockRecorder) ReplaceInstances(leavingInstanceIDs, candidates interface{}) *gomock.Call { 2480 mr.mock.ctrl.T.Helper() 2481 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceInstances", reflect.TypeOf((*Mockoperations)(nil).ReplaceInstances), leavingInstanceIDs, candidates) 2482 } 2483 2484 // MockAlgorithm is a mock of Algorithm interface. 2485 type MockAlgorithm struct { 2486 ctrl *gomock.Controller 2487 recorder *MockAlgorithmMockRecorder 2488 } 2489 2490 // MockAlgorithmMockRecorder is the mock recorder for MockAlgorithm. 2491 type MockAlgorithmMockRecorder struct { 2492 mock *MockAlgorithm 2493 } 2494 2495 // NewMockAlgorithm creates a new mock instance. 2496 func NewMockAlgorithm(ctrl *gomock.Controller) *MockAlgorithm { 2497 mock := &MockAlgorithm{ctrl: ctrl} 2498 mock.recorder = &MockAlgorithmMockRecorder{mock} 2499 return mock 2500 } 2501 2502 // EXPECT returns an object that allows the caller to indicate expected use. 2503 func (m *MockAlgorithm) EXPECT() *MockAlgorithmMockRecorder { 2504 return m.recorder 2505 } 2506 2507 // AddInstances mocks base method. 2508 func (m *MockAlgorithm) AddInstances(p Placement, instances []Instance) (Placement, error) { 2509 m.ctrl.T.Helper() 2510 ret := m.ctrl.Call(m, "AddInstances", p, instances) 2511 ret0, _ := ret[0].(Placement) 2512 ret1, _ := ret[1].(error) 2513 return ret0, ret1 2514 } 2515 2516 // AddInstances indicates an expected call of AddInstances. 2517 func (mr *MockAlgorithmMockRecorder) AddInstances(p, instances interface{}) *gomock.Call { 2518 mr.mock.ctrl.T.Helper() 2519 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddInstances", reflect.TypeOf((*MockAlgorithm)(nil).AddInstances), p, instances) 2520 } 2521 2522 // AddReplica mocks base method. 2523 func (m *MockAlgorithm) AddReplica(p Placement) (Placement, error) { 2524 m.ctrl.T.Helper() 2525 ret := m.ctrl.Call(m, "AddReplica", p) 2526 ret0, _ := ret[0].(Placement) 2527 ret1, _ := ret[1].(error) 2528 return ret0, ret1 2529 } 2530 2531 // AddReplica indicates an expected call of AddReplica. 2532 func (mr *MockAlgorithmMockRecorder) AddReplica(p interface{}) *gomock.Call { 2533 mr.mock.ctrl.T.Helper() 2534 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddReplica", reflect.TypeOf((*MockAlgorithm)(nil).AddReplica), p) 2535 } 2536 2537 // BalanceShards mocks base method. 2538 func (m *MockAlgorithm) BalanceShards(p Placement) (Placement, error) { 2539 m.ctrl.T.Helper() 2540 ret := m.ctrl.Call(m, "BalanceShards", p) 2541 ret0, _ := ret[0].(Placement) 2542 ret1, _ := ret[1].(error) 2543 return ret0, ret1 2544 } 2545 2546 // BalanceShards indicates an expected call of BalanceShards. 2547 func (mr *MockAlgorithmMockRecorder) BalanceShards(p interface{}) *gomock.Call { 2548 mr.mock.ctrl.T.Helper() 2549 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BalanceShards", reflect.TypeOf((*MockAlgorithm)(nil).BalanceShards), p) 2550 } 2551 2552 // InitialPlacement mocks base method. 2553 func (m *MockAlgorithm) InitialPlacement(instances []Instance, shards []uint32, rf int) (Placement, error) { 2554 m.ctrl.T.Helper() 2555 ret := m.ctrl.Call(m, "InitialPlacement", instances, shards, rf) 2556 ret0, _ := ret[0].(Placement) 2557 ret1, _ := ret[1].(error) 2558 return ret0, ret1 2559 } 2560 2561 // InitialPlacement indicates an expected call of InitialPlacement. 2562 func (mr *MockAlgorithmMockRecorder) InitialPlacement(instances, shards, rf interface{}) *gomock.Call { 2563 mr.mock.ctrl.T.Helper() 2564 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitialPlacement", reflect.TypeOf((*MockAlgorithm)(nil).InitialPlacement), instances, shards, rf) 2565 } 2566 2567 // IsCompatibleWith mocks base method. 2568 func (m *MockAlgorithm) IsCompatibleWith(p Placement) error { 2569 m.ctrl.T.Helper() 2570 ret := m.ctrl.Call(m, "IsCompatibleWith", p) 2571 ret0, _ := ret[0].(error) 2572 return ret0 2573 } 2574 2575 // IsCompatibleWith indicates an expected call of IsCompatibleWith. 2576 func (mr *MockAlgorithmMockRecorder) IsCompatibleWith(p interface{}) *gomock.Call { 2577 mr.mock.ctrl.T.Helper() 2578 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCompatibleWith", reflect.TypeOf((*MockAlgorithm)(nil).IsCompatibleWith), p) 2579 } 2580 2581 // MarkAllShardsAvailable mocks base method. 2582 func (m *MockAlgorithm) MarkAllShardsAvailable(p Placement) (Placement, bool, error) { 2583 m.ctrl.T.Helper() 2584 ret := m.ctrl.Call(m, "MarkAllShardsAvailable", p) 2585 ret0, _ := ret[0].(Placement) 2586 ret1, _ := ret[1].(bool) 2587 ret2, _ := ret[2].(error) 2588 return ret0, ret1, ret2 2589 } 2590 2591 // MarkAllShardsAvailable indicates an expected call of MarkAllShardsAvailable. 2592 func (mr *MockAlgorithmMockRecorder) MarkAllShardsAvailable(p interface{}) *gomock.Call { 2593 mr.mock.ctrl.T.Helper() 2594 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkAllShardsAvailable", reflect.TypeOf((*MockAlgorithm)(nil).MarkAllShardsAvailable), p) 2595 } 2596 2597 // MarkShardsAvailable mocks base method. 2598 func (m *MockAlgorithm) MarkShardsAvailable(p Placement, instanceID string, shardIDs ...uint32) (Placement, error) { 2599 m.ctrl.T.Helper() 2600 varargs := []interface{}{p, instanceID} 2601 for _, a := range shardIDs { 2602 varargs = append(varargs, a) 2603 } 2604 ret := m.ctrl.Call(m, "MarkShardsAvailable", varargs...) 2605 ret0, _ := ret[0].(Placement) 2606 ret1, _ := ret[1].(error) 2607 return ret0, ret1 2608 } 2609 2610 // MarkShardsAvailable indicates an expected call of MarkShardsAvailable. 2611 func (mr *MockAlgorithmMockRecorder) MarkShardsAvailable(p, instanceID interface{}, shardIDs ...interface{}) *gomock.Call { 2612 mr.mock.ctrl.T.Helper() 2613 varargs := append([]interface{}{p, instanceID}, shardIDs...) 2614 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MarkShardsAvailable", reflect.TypeOf((*MockAlgorithm)(nil).MarkShardsAvailable), varargs...) 2615 } 2616 2617 // RemoveInstances mocks base method. 2618 func (m *MockAlgorithm) RemoveInstances(p Placement, leavingInstanceIDs []string) (Placement, error) { 2619 m.ctrl.T.Helper() 2620 ret := m.ctrl.Call(m, "RemoveInstances", p, leavingInstanceIDs) 2621 ret0, _ := ret[0].(Placement) 2622 ret1, _ := ret[1].(error) 2623 return ret0, ret1 2624 } 2625 2626 // RemoveInstances indicates an expected call of RemoveInstances. 2627 func (mr *MockAlgorithmMockRecorder) RemoveInstances(p, leavingInstanceIDs interface{}) *gomock.Call { 2628 mr.mock.ctrl.T.Helper() 2629 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveInstances", reflect.TypeOf((*MockAlgorithm)(nil).RemoveInstances), p, leavingInstanceIDs) 2630 } 2631 2632 // ReplaceInstances mocks base method. 2633 func (m *MockAlgorithm) ReplaceInstances(p Placement, leavingInstanecIDs []string, addingInstances []Instance) (Placement, error) { 2634 m.ctrl.T.Helper() 2635 ret := m.ctrl.Call(m, "ReplaceInstances", p, leavingInstanecIDs, addingInstances) 2636 ret0, _ := ret[0].(Placement) 2637 ret1, _ := ret[1].(error) 2638 return ret0, ret1 2639 } 2640 2641 // ReplaceInstances indicates an expected call of ReplaceInstances. 2642 func (mr *MockAlgorithmMockRecorder) ReplaceInstances(p, leavingInstanecIDs, addingInstances interface{}) *gomock.Call { 2643 mr.mock.ctrl.T.Helper() 2644 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReplaceInstances", reflect.TypeOf((*MockAlgorithm)(nil).ReplaceInstances), p, leavingInstanecIDs, addingInstances) 2645 } 2646 2647 // MockInstanceSelector is a mock of InstanceSelector interface. 2648 type MockInstanceSelector struct { 2649 ctrl *gomock.Controller 2650 recorder *MockInstanceSelectorMockRecorder 2651 } 2652 2653 // MockInstanceSelectorMockRecorder is the mock recorder for MockInstanceSelector. 2654 type MockInstanceSelectorMockRecorder struct { 2655 mock *MockInstanceSelector 2656 } 2657 2658 // NewMockInstanceSelector creates a new mock instance. 2659 func NewMockInstanceSelector(ctrl *gomock.Controller) *MockInstanceSelector { 2660 mock := &MockInstanceSelector{ctrl: ctrl} 2661 mock.recorder = &MockInstanceSelectorMockRecorder{mock} 2662 return mock 2663 } 2664 2665 // EXPECT returns an object that allows the caller to indicate expected use. 2666 func (m *MockInstanceSelector) EXPECT() *MockInstanceSelectorMockRecorder { 2667 return m.recorder 2668 } 2669 2670 // SelectAddingInstances mocks base method. 2671 func (m *MockInstanceSelector) SelectAddingInstances(candidates []Instance, p Placement) ([]Instance, error) { 2672 m.ctrl.T.Helper() 2673 ret := m.ctrl.Call(m, "SelectAddingInstances", candidates, p) 2674 ret0, _ := ret[0].([]Instance) 2675 ret1, _ := ret[1].(error) 2676 return ret0, ret1 2677 } 2678 2679 // SelectAddingInstances indicates an expected call of SelectAddingInstances. 2680 func (mr *MockInstanceSelectorMockRecorder) SelectAddingInstances(candidates, p interface{}) *gomock.Call { 2681 mr.mock.ctrl.T.Helper() 2682 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectAddingInstances", reflect.TypeOf((*MockInstanceSelector)(nil).SelectAddingInstances), candidates, p) 2683 } 2684 2685 // SelectInitialInstances mocks base method. 2686 func (m *MockInstanceSelector) SelectInitialInstances(candidates []Instance, rf int) ([]Instance, error) { 2687 m.ctrl.T.Helper() 2688 ret := m.ctrl.Call(m, "SelectInitialInstances", candidates, rf) 2689 ret0, _ := ret[0].([]Instance) 2690 ret1, _ := ret[1].(error) 2691 return ret0, ret1 2692 } 2693 2694 // SelectInitialInstances indicates an expected call of SelectInitialInstances. 2695 func (mr *MockInstanceSelectorMockRecorder) SelectInitialInstances(candidates, rf interface{}) *gomock.Call { 2696 mr.mock.ctrl.T.Helper() 2697 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectInitialInstances", reflect.TypeOf((*MockInstanceSelector)(nil).SelectInitialInstances), candidates, rf) 2698 } 2699 2700 // SelectReplaceInstances mocks base method. 2701 func (m *MockInstanceSelector) SelectReplaceInstances(candidates []Instance, leavingInstanceIDs []string, p Placement) ([]Instance, error) { 2702 m.ctrl.T.Helper() 2703 ret := m.ctrl.Call(m, "SelectReplaceInstances", candidates, leavingInstanceIDs, p) 2704 ret0, _ := ret[0].([]Instance) 2705 ret1, _ := ret[1].(error) 2706 return ret0, ret1 2707 } 2708 2709 // SelectReplaceInstances indicates an expected call of SelectReplaceInstances. 2710 func (mr *MockInstanceSelectorMockRecorder) SelectReplaceInstances(candidates, leavingInstanceIDs, p interface{}) *gomock.Call { 2711 mr.mock.ctrl.T.Helper() 2712 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelectReplaceInstances", reflect.TypeOf((*MockInstanceSelector)(nil).SelectReplaceInstances), candidates, leavingInstanceIDs, p) 2713 } 2714 2715 // MockDeploymentPlanner is a mock of DeploymentPlanner interface. 2716 type MockDeploymentPlanner struct { 2717 ctrl *gomock.Controller 2718 recorder *MockDeploymentPlannerMockRecorder 2719 } 2720 2721 // MockDeploymentPlannerMockRecorder is the mock recorder for MockDeploymentPlanner. 2722 type MockDeploymentPlannerMockRecorder struct { 2723 mock *MockDeploymentPlanner 2724 } 2725 2726 // NewMockDeploymentPlanner creates a new mock instance. 2727 func NewMockDeploymentPlanner(ctrl *gomock.Controller) *MockDeploymentPlanner { 2728 mock := &MockDeploymentPlanner{ctrl: ctrl} 2729 mock.recorder = &MockDeploymentPlannerMockRecorder{mock} 2730 return mock 2731 } 2732 2733 // EXPECT returns an object that allows the caller to indicate expected use. 2734 func (m *MockDeploymentPlanner) EXPECT() *MockDeploymentPlannerMockRecorder { 2735 return m.recorder 2736 } 2737 2738 // DeploymentSteps mocks base method. 2739 func (m *MockDeploymentPlanner) DeploymentSteps(p Placement) [][]Instance { 2740 m.ctrl.T.Helper() 2741 ret := m.ctrl.Call(m, "DeploymentSteps", p) 2742 ret0, _ := ret[0].([][]Instance) 2743 return ret0 2744 } 2745 2746 // DeploymentSteps indicates an expected call of DeploymentSteps. 2747 func (mr *MockDeploymentPlannerMockRecorder) DeploymentSteps(p interface{}) *gomock.Call { 2748 mr.mock.ctrl.T.Helper() 2749 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeploymentSteps", reflect.TypeOf((*MockDeploymentPlanner)(nil).DeploymentSteps), p) 2750 } 2751 2752 // MockDeploymentOptions is a mock of DeploymentOptions interface. 2753 type MockDeploymentOptions struct { 2754 ctrl *gomock.Controller 2755 recorder *MockDeploymentOptionsMockRecorder 2756 } 2757 2758 // MockDeploymentOptionsMockRecorder is the mock recorder for MockDeploymentOptions. 2759 type MockDeploymentOptionsMockRecorder struct { 2760 mock *MockDeploymentOptions 2761 } 2762 2763 // NewMockDeploymentOptions creates a new mock instance. 2764 func NewMockDeploymentOptions(ctrl *gomock.Controller) *MockDeploymentOptions { 2765 mock := &MockDeploymentOptions{ctrl: ctrl} 2766 mock.recorder = &MockDeploymentOptionsMockRecorder{mock} 2767 return mock 2768 } 2769 2770 // EXPECT returns an object that allows the caller to indicate expected use. 2771 func (m *MockDeploymentOptions) EXPECT() *MockDeploymentOptionsMockRecorder { 2772 return m.recorder 2773 } 2774 2775 // MaxStepSize mocks base method. 2776 func (m *MockDeploymentOptions) MaxStepSize() int { 2777 m.ctrl.T.Helper() 2778 ret := m.ctrl.Call(m, "MaxStepSize") 2779 ret0, _ := ret[0].(int) 2780 return ret0 2781 } 2782 2783 // MaxStepSize indicates an expected call of MaxStepSize. 2784 func (mr *MockDeploymentOptionsMockRecorder) MaxStepSize() *gomock.Call { 2785 mr.mock.ctrl.T.Helper() 2786 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MaxStepSize", reflect.TypeOf((*MockDeploymentOptions)(nil).MaxStepSize)) 2787 } 2788 2789 // SetMaxStepSize mocks base method. 2790 func (m *MockDeploymentOptions) SetMaxStepSize(stepSize int) DeploymentOptions { 2791 m.ctrl.T.Helper() 2792 ret := m.ctrl.Call(m, "SetMaxStepSize", stepSize) 2793 ret0, _ := ret[0].(DeploymentOptions) 2794 return ret0 2795 } 2796 2797 // SetMaxStepSize indicates an expected call of SetMaxStepSize. 2798 func (mr *MockDeploymentOptionsMockRecorder) SetMaxStepSize(stepSize interface{}) *gomock.Call { 2799 mr.mock.ctrl.T.Helper() 2800 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetMaxStepSize", reflect.TypeOf((*MockDeploymentOptions)(nil).SetMaxStepSize), stepSize) 2801 }