github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/store/mocks/Store.go (about) 1 // Code generated by mockery v2.33.2. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 context "context" 7 8 lock "github.com/projecteru2/core/lock" 9 mock "github.com/stretchr/testify/mock" 10 11 store "github.com/projecteru2/core/store" 12 13 time "time" 14 15 types "github.com/projecteru2/core/types" 16 ) 17 18 // Store is an autogenerated mock type for the Store type 19 type Store struct { 20 mock.Mock 21 } 22 23 // AddNode provides a mock function with given fields: _a0, _a1 24 func (_m *Store) AddNode(_a0 context.Context, _a1 *types.AddNodeOptions) (*types.Node, error) { 25 ret := _m.Called(_a0, _a1) 26 27 var r0 *types.Node 28 var r1 error 29 if rf, ok := ret.Get(0).(func(context.Context, *types.AddNodeOptions) (*types.Node, error)); ok { 30 return rf(_a0, _a1) 31 } 32 if rf, ok := ret.Get(0).(func(context.Context, *types.AddNodeOptions) *types.Node); ok { 33 r0 = rf(_a0, _a1) 34 } else { 35 if ret.Get(0) != nil { 36 r0 = ret.Get(0).(*types.Node) 37 } 38 } 39 40 if rf, ok := ret.Get(1).(func(context.Context, *types.AddNodeOptions) error); ok { 41 r1 = rf(_a0, _a1) 42 } else { 43 r1 = ret.Error(1) 44 } 45 46 return r0, r1 47 } 48 49 // AddPod provides a mock function with given fields: ctx, name, desc 50 func (_m *Store) AddPod(ctx context.Context, name string, desc string) (*types.Pod, error) { 51 ret := _m.Called(ctx, name, desc) 52 53 var r0 *types.Pod 54 var r1 error 55 if rf, ok := ret.Get(0).(func(context.Context, string, string) (*types.Pod, error)); ok { 56 return rf(ctx, name, desc) 57 } 58 if rf, ok := ret.Get(0).(func(context.Context, string, string) *types.Pod); ok { 59 r0 = rf(ctx, name, desc) 60 } else { 61 if ret.Get(0) != nil { 62 r0 = ret.Get(0).(*types.Pod) 63 } 64 } 65 66 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 67 r1 = rf(ctx, name, desc) 68 } else { 69 r1 = ret.Error(1) 70 } 71 72 return r0, r1 73 } 74 75 // AddWorkload provides a mock function with given fields: _a0, _a1, _a2 76 func (_m *Store) AddWorkload(_a0 context.Context, _a1 *types.Workload, _a2 *types.Processing) error { 77 ret := _m.Called(_a0, _a1, _a2) 78 79 var r0 error 80 if rf, ok := ret.Get(0).(func(context.Context, *types.Workload, *types.Processing) error); ok { 81 r0 = rf(_a0, _a1, _a2) 82 } else { 83 r0 = ret.Error(0) 84 } 85 86 return r0 87 } 88 89 // CreateLock provides a mock function with given fields: key, ttl 90 func (_m *Store) CreateLock(key string, ttl time.Duration) (lock.DistributedLock, error) { 91 ret := _m.Called(key, ttl) 92 93 var r0 lock.DistributedLock 94 var r1 error 95 if rf, ok := ret.Get(0).(func(string, time.Duration) (lock.DistributedLock, error)); ok { 96 return rf(key, ttl) 97 } 98 if rf, ok := ret.Get(0).(func(string, time.Duration) lock.DistributedLock); ok { 99 r0 = rf(key, ttl) 100 } else { 101 if ret.Get(0) != nil { 102 r0 = ret.Get(0).(lock.DistributedLock) 103 } 104 } 105 106 if rf, ok := ret.Get(1).(func(string, time.Duration) error); ok { 107 r1 = rf(key, ttl) 108 } else { 109 r1 = ret.Error(1) 110 } 111 112 return r0, r1 113 } 114 115 // CreateProcessing provides a mock function with given fields: ctx, process, count 116 func (_m *Store) CreateProcessing(ctx context.Context, process *types.Processing, count int) error { 117 ret := _m.Called(ctx, process, count) 118 119 var r0 error 120 if rf, ok := ret.Get(0).(func(context.Context, *types.Processing, int) error); ok { 121 r0 = rf(ctx, process, count) 122 } else { 123 r0 = ret.Error(0) 124 } 125 126 return r0 127 } 128 129 // DeleteProcessing provides a mock function with given fields: _a0, _a1 130 func (_m *Store) DeleteProcessing(_a0 context.Context, _a1 *types.Processing) error { 131 ret := _m.Called(_a0, _a1) 132 133 var r0 error 134 if rf, ok := ret.Get(0).(func(context.Context, *types.Processing) error); ok { 135 r0 = rf(_a0, _a1) 136 } else { 137 r0 = ret.Error(0) 138 } 139 140 return r0 141 } 142 143 // GetAllPods provides a mock function with given fields: ctx 144 func (_m *Store) GetAllPods(ctx context.Context) ([]*types.Pod, error) { 145 ret := _m.Called(ctx) 146 147 var r0 []*types.Pod 148 var r1 error 149 if rf, ok := ret.Get(0).(func(context.Context) ([]*types.Pod, error)); ok { 150 return rf(ctx) 151 } 152 if rf, ok := ret.Get(0).(func(context.Context) []*types.Pod); ok { 153 r0 = rf(ctx) 154 } else { 155 if ret.Get(0) != nil { 156 r0 = ret.Get(0).([]*types.Pod) 157 } 158 } 159 160 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 161 r1 = rf(ctx) 162 } else { 163 r1 = ret.Error(1) 164 } 165 166 return r0, r1 167 } 168 169 // GetDeployStatus provides a mock function with given fields: ctx, appname, entryname 170 func (_m *Store) GetDeployStatus(ctx context.Context, appname string, entryname string) (map[string]int, error) { 171 ret := _m.Called(ctx, appname, entryname) 172 173 var r0 map[string]int 174 var r1 error 175 if rf, ok := ret.Get(0).(func(context.Context, string, string) (map[string]int, error)); ok { 176 return rf(ctx, appname, entryname) 177 } 178 if rf, ok := ret.Get(0).(func(context.Context, string, string) map[string]int); ok { 179 r0 = rf(ctx, appname, entryname) 180 } else { 181 if ret.Get(0) != nil { 182 r0 = ret.Get(0).(map[string]int) 183 } 184 } 185 186 if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok { 187 r1 = rf(ctx, appname, entryname) 188 } else { 189 r1 = ret.Error(1) 190 } 191 192 return r0, r1 193 } 194 195 // GetNode provides a mock function with given fields: ctx, nodename 196 func (_m *Store) GetNode(ctx context.Context, nodename string) (*types.Node, error) { 197 ret := _m.Called(ctx, nodename) 198 199 var r0 *types.Node 200 var r1 error 201 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.Node, error)); ok { 202 return rf(ctx, nodename) 203 } 204 if rf, ok := ret.Get(0).(func(context.Context, string) *types.Node); ok { 205 r0 = rf(ctx, nodename) 206 } else { 207 if ret.Get(0) != nil { 208 r0 = ret.Get(0).(*types.Node) 209 } 210 } 211 212 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 213 r1 = rf(ctx, nodename) 214 } else { 215 r1 = ret.Error(1) 216 } 217 218 return r0, r1 219 } 220 221 // GetNodeStatus provides a mock function with given fields: ctx, nodename 222 func (_m *Store) GetNodeStatus(ctx context.Context, nodename string) (*types.NodeStatus, error) { 223 ret := _m.Called(ctx, nodename) 224 225 var r0 *types.NodeStatus 226 var r1 error 227 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.NodeStatus, error)); ok { 228 return rf(ctx, nodename) 229 } 230 if rf, ok := ret.Get(0).(func(context.Context, string) *types.NodeStatus); ok { 231 r0 = rf(ctx, nodename) 232 } else { 233 if ret.Get(0) != nil { 234 r0 = ret.Get(0).(*types.NodeStatus) 235 } 236 } 237 238 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 239 r1 = rf(ctx, nodename) 240 } else { 241 r1 = ret.Error(1) 242 } 243 244 return r0, r1 245 } 246 247 // GetNodes provides a mock function with given fields: ctx, nodenames 248 func (_m *Store) GetNodes(ctx context.Context, nodenames []string) ([]*types.Node, error) { 249 ret := _m.Called(ctx, nodenames) 250 251 var r0 []*types.Node 252 var r1 error 253 if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*types.Node, error)); ok { 254 return rf(ctx, nodenames) 255 } 256 if rf, ok := ret.Get(0).(func(context.Context, []string) []*types.Node); ok { 257 r0 = rf(ctx, nodenames) 258 } else { 259 if ret.Get(0) != nil { 260 r0 = ret.Get(0).([]*types.Node) 261 } 262 } 263 264 if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { 265 r1 = rf(ctx, nodenames) 266 } else { 267 r1 = ret.Error(1) 268 } 269 270 return r0, r1 271 } 272 273 // GetNodesByPod provides a mock function with given fields: ctx, nodeFilter, opts 274 func (_m *Store) GetNodesByPod(ctx context.Context, nodeFilter *types.NodeFilter, opts ...store.Option) ([]*types.Node, error) { 275 _va := make([]interface{}, len(opts)) 276 for _i := range opts { 277 _va[_i] = opts[_i] 278 } 279 var _ca []interface{} 280 _ca = append(_ca, ctx, nodeFilter) 281 _ca = append(_ca, _va...) 282 ret := _m.Called(_ca...) 283 284 var r0 []*types.Node 285 var r1 error 286 if rf, ok := ret.Get(0).(func(context.Context, *types.NodeFilter, ...store.Option) ([]*types.Node, error)); ok { 287 return rf(ctx, nodeFilter, opts...) 288 } 289 if rf, ok := ret.Get(0).(func(context.Context, *types.NodeFilter, ...store.Option) []*types.Node); ok { 290 r0 = rf(ctx, nodeFilter, opts...) 291 } else { 292 if ret.Get(0) != nil { 293 r0 = ret.Get(0).([]*types.Node) 294 } 295 } 296 297 if rf, ok := ret.Get(1).(func(context.Context, *types.NodeFilter, ...store.Option) error); ok { 298 r1 = rf(ctx, nodeFilter, opts...) 299 } else { 300 r1 = ret.Error(1) 301 } 302 303 return r0, r1 304 } 305 306 // GetPod provides a mock function with given fields: ctx, podname 307 func (_m *Store) GetPod(ctx context.Context, podname string) (*types.Pod, error) { 308 ret := _m.Called(ctx, podname) 309 310 var r0 *types.Pod 311 var r1 error 312 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.Pod, error)); ok { 313 return rf(ctx, podname) 314 } 315 if rf, ok := ret.Get(0).(func(context.Context, string) *types.Pod); ok { 316 r0 = rf(ctx, podname) 317 } else { 318 if ret.Get(0) != nil { 319 r0 = ret.Get(0).(*types.Pod) 320 } 321 } 322 323 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 324 r1 = rf(ctx, podname) 325 } else { 326 r1 = ret.Error(1) 327 } 328 329 return r0, r1 330 } 331 332 // GetWorkload provides a mock function with given fields: ctx, ID 333 func (_m *Store) GetWorkload(ctx context.Context, ID string) (*types.Workload, error) { 334 ret := _m.Called(ctx, ID) 335 336 var r0 *types.Workload 337 var r1 error 338 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.Workload, error)); ok { 339 return rf(ctx, ID) 340 } 341 if rf, ok := ret.Get(0).(func(context.Context, string) *types.Workload); ok { 342 r0 = rf(ctx, ID) 343 } else { 344 if ret.Get(0) != nil { 345 r0 = ret.Get(0).(*types.Workload) 346 } 347 } 348 349 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 350 r1 = rf(ctx, ID) 351 } else { 352 r1 = ret.Error(1) 353 } 354 355 return r0, r1 356 } 357 358 // GetWorkloadStatus provides a mock function with given fields: ctx, ID 359 func (_m *Store) GetWorkloadStatus(ctx context.Context, ID string) (*types.StatusMeta, error) { 360 ret := _m.Called(ctx, ID) 361 362 var r0 *types.StatusMeta 363 var r1 error 364 if rf, ok := ret.Get(0).(func(context.Context, string) (*types.StatusMeta, error)); ok { 365 return rf(ctx, ID) 366 } 367 if rf, ok := ret.Get(0).(func(context.Context, string) *types.StatusMeta); ok { 368 r0 = rf(ctx, ID) 369 } else { 370 if ret.Get(0) != nil { 371 r0 = ret.Get(0).(*types.StatusMeta) 372 } 373 } 374 375 if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { 376 r1 = rf(ctx, ID) 377 } else { 378 r1 = ret.Error(1) 379 } 380 381 return r0, r1 382 } 383 384 // GetWorkloads provides a mock function with given fields: ctx, IDs 385 func (_m *Store) GetWorkloads(ctx context.Context, IDs []string) ([]*types.Workload, error) { 386 ret := _m.Called(ctx, IDs) 387 388 var r0 []*types.Workload 389 var r1 error 390 if rf, ok := ret.Get(0).(func(context.Context, []string) ([]*types.Workload, error)); ok { 391 return rf(ctx, IDs) 392 } 393 if rf, ok := ret.Get(0).(func(context.Context, []string) []*types.Workload); ok { 394 r0 = rf(ctx, IDs) 395 } else { 396 if ret.Get(0) != nil { 397 r0 = ret.Get(0).([]*types.Workload) 398 } 399 } 400 401 if rf, ok := ret.Get(1).(func(context.Context, []string) error); ok { 402 r1 = rf(ctx, IDs) 403 } else { 404 r1 = ret.Error(1) 405 } 406 407 return r0, r1 408 } 409 410 // ListNodeWorkloads provides a mock function with given fields: ctx, nodename, labels 411 func (_m *Store) ListNodeWorkloads(ctx context.Context, nodename string, labels map[string]string) ([]*types.Workload, error) { 412 ret := _m.Called(ctx, nodename, labels) 413 414 var r0 []*types.Workload 415 var r1 error 416 if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) ([]*types.Workload, error)); ok { 417 return rf(ctx, nodename, labels) 418 } 419 if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) []*types.Workload); ok { 420 r0 = rf(ctx, nodename, labels) 421 } else { 422 if ret.Get(0) != nil { 423 r0 = ret.Get(0).([]*types.Workload) 424 } 425 } 426 427 if rf, ok := ret.Get(1).(func(context.Context, string, map[string]string) error); ok { 428 r1 = rf(ctx, nodename, labels) 429 } else { 430 r1 = ret.Error(1) 431 } 432 433 return r0, r1 434 } 435 436 // ListWorkloads provides a mock function with given fields: ctx, appname, entrypoint, nodename, limit, labels 437 func (_m *Store) ListWorkloads(ctx context.Context, appname string, entrypoint string, nodename string, limit int64, labels map[string]string) ([]*types.Workload, error) { 438 ret := _m.Called(ctx, appname, entrypoint, nodename, limit, labels) 439 440 var r0 []*types.Workload 441 var r1 error 442 if rf, ok := ret.Get(0).(func(context.Context, string, string, string, int64, map[string]string) ([]*types.Workload, error)); ok { 443 return rf(ctx, appname, entrypoint, nodename, limit, labels) 444 } 445 if rf, ok := ret.Get(0).(func(context.Context, string, string, string, int64, map[string]string) []*types.Workload); ok { 446 r0 = rf(ctx, appname, entrypoint, nodename, limit, labels) 447 } else { 448 if ret.Get(0) != nil { 449 r0 = ret.Get(0).([]*types.Workload) 450 } 451 } 452 453 if rf, ok := ret.Get(1).(func(context.Context, string, string, string, int64, map[string]string) error); ok { 454 r1 = rf(ctx, appname, entrypoint, nodename, limit, labels) 455 } else { 456 r1 = ret.Error(1) 457 } 458 459 return r0, r1 460 } 461 462 // LoadNodeCert provides a mock function with given fields: ctx, node 463 func (_m *Store) LoadNodeCert(ctx context.Context, node *types.Node) error { 464 ret := _m.Called(ctx, node) 465 466 var r0 error 467 if rf, ok := ret.Get(0).(func(context.Context, *types.Node) error); ok { 468 r0 = rf(ctx, node) 469 } else { 470 r0 = ret.Error(0) 471 } 472 473 return r0 474 } 475 476 // NodeStatusStream provides a mock function with given fields: ctx 477 func (_m *Store) NodeStatusStream(ctx context.Context) chan *types.NodeStatus { 478 ret := _m.Called(ctx) 479 480 var r0 chan *types.NodeStatus 481 if rf, ok := ret.Get(0).(func(context.Context) chan *types.NodeStatus); ok { 482 r0 = rf(ctx) 483 } else { 484 if ret.Get(0) != nil { 485 r0 = ret.Get(0).(chan *types.NodeStatus) 486 } 487 } 488 489 return r0 490 } 491 492 // RegisterService provides a mock function with given fields: _a0, _a1, _a2 493 func (_m *Store) RegisterService(_a0 context.Context, _a1 string, _a2 time.Duration) (<-chan struct{}, func(), error) { 494 ret := _m.Called(_a0, _a1, _a2) 495 496 var r0 <-chan struct{} 497 var r1 func() 498 var r2 error 499 if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) (<-chan struct{}, func(), error)); ok { 500 return rf(_a0, _a1, _a2) 501 } 502 if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) <-chan struct{}); ok { 503 r0 = rf(_a0, _a1, _a2) 504 } else { 505 if ret.Get(0) != nil { 506 r0 = ret.Get(0).(<-chan struct{}) 507 } 508 } 509 510 if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration) func()); ok { 511 r1 = rf(_a0, _a1, _a2) 512 } else { 513 if ret.Get(1) != nil { 514 r1 = ret.Get(1).(func()) 515 } 516 } 517 518 if rf, ok := ret.Get(2).(func(context.Context, string, time.Duration) error); ok { 519 r2 = rf(_a0, _a1, _a2) 520 } else { 521 r2 = ret.Error(2) 522 } 523 524 return r0, r1, r2 525 } 526 527 // RemoveNode provides a mock function with given fields: ctx, node 528 func (_m *Store) RemoveNode(ctx context.Context, node *types.Node) error { 529 ret := _m.Called(ctx, node) 530 531 var r0 error 532 if rf, ok := ret.Get(0).(func(context.Context, *types.Node) error); ok { 533 r0 = rf(ctx, node) 534 } else { 535 r0 = ret.Error(0) 536 } 537 538 return r0 539 } 540 541 // RemovePod provides a mock function with given fields: ctx, podname 542 func (_m *Store) RemovePod(ctx context.Context, podname string) error { 543 ret := _m.Called(ctx, podname) 544 545 var r0 error 546 if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { 547 r0 = rf(ctx, podname) 548 } else { 549 r0 = ret.Error(0) 550 } 551 552 return r0 553 } 554 555 // RemoveWorkload provides a mock function with given fields: ctx, workload 556 func (_m *Store) RemoveWorkload(ctx context.Context, workload *types.Workload) error { 557 ret := _m.Called(ctx, workload) 558 559 var r0 error 560 if rf, ok := ret.Get(0).(func(context.Context, *types.Workload) error); ok { 561 r0 = rf(ctx, workload) 562 } else { 563 r0 = ret.Error(0) 564 } 565 566 return r0 567 } 568 569 // ServiceStatusStream provides a mock function with given fields: _a0 570 func (_m *Store) ServiceStatusStream(_a0 context.Context) (chan []string, error) { 571 ret := _m.Called(_a0) 572 573 var r0 chan []string 574 var r1 error 575 if rf, ok := ret.Get(0).(func(context.Context) (chan []string, error)); ok { 576 return rf(_a0) 577 } 578 if rf, ok := ret.Get(0).(func(context.Context) chan []string); ok { 579 r0 = rf(_a0) 580 } else { 581 if ret.Get(0) != nil { 582 r0 = ret.Get(0).(chan []string) 583 } 584 } 585 586 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 587 r1 = rf(_a0) 588 } else { 589 r1 = ret.Error(1) 590 } 591 592 return r0, r1 593 } 594 595 // SetNodeStatus provides a mock function with given fields: ctx, node, ttl 596 func (_m *Store) SetNodeStatus(ctx context.Context, node *types.Node, ttl int64) error { 597 ret := _m.Called(ctx, node, ttl) 598 599 var r0 error 600 if rf, ok := ret.Get(0).(func(context.Context, *types.Node, int64) error); ok { 601 r0 = rf(ctx, node, ttl) 602 } else { 603 r0 = ret.Error(0) 604 } 605 606 return r0 607 } 608 609 // SetWorkloadStatus provides a mock function with given fields: ctx, status, ttl 610 func (_m *Store) SetWorkloadStatus(ctx context.Context, status *types.StatusMeta, ttl int64) error { 611 ret := _m.Called(ctx, status, ttl) 612 613 var r0 error 614 if rf, ok := ret.Get(0).(func(context.Context, *types.StatusMeta, int64) error); ok { 615 r0 = rf(ctx, status, ttl) 616 } else { 617 r0 = ret.Error(0) 618 } 619 620 return r0 621 } 622 623 // StartEphemeral provides a mock function with given fields: ctx, path, heartbeat 624 func (_m *Store) StartEphemeral(ctx context.Context, path string, heartbeat time.Duration) (<-chan struct{}, func(), error) { 625 ret := _m.Called(ctx, path, heartbeat) 626 627 var r0 <-chan struct{} 628 var r1 func() 629 var r2 error 630 if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) (<-chan struct{}, func(), error)); ok { 631 return rf(ctx, path, heartbeat) 632 } 633 if rf, ok := ret.Get(0).(func(context.Context, string, time.Duration) <-chan struct{}); ok { 634 r0 = rf(ctx, path, heartbeat) 635 } else { 636 if ret.Get(0) != nil { 637 r0 = ret.Get(0).(<-chan struct{}) 638 } 639 } 640 641 if rf, ok := ret.Get(1).(func(context.Context, string, time.Duration) func()); ok { 642 r1 = rf(ctx, path, heartbeat) 643 } else { 644 if ret.Get(1) != nil { 645 r1 = ret.Get(1).(func()) 646 } 647 } 648 649 if rf, ok := ret.Get(2).(func(context.Context, string, time.Duration) error); ok { 650 r2 = rf(ctx, path, heartbeat) 651 } else { 652 r2 = ret.Error(2) 653 } 654 655 return r0, r1, r2 656 } 657 658 // UpdateNodes provides a mock function with given fields: _a0, _a1 659 func (_m *Store) UpdateNodes(_a0 context.Context, _a1 ...*types.Node) error { 660 _va := make([]interface{}, len(_a1)) 661 for _i := range _a1 { 662 _va[_i] = _a1[_i] 663 } 664 var _ca []interface{} 665 _ca = append(_ca, _a0) 666 _ca = append(_ca, _va...) 667 ret := _m.Called(_ca...) 668 669 var r0 error 670 if rf, ok := ret.Get(0).(func(context.Context, ...*types.Node) error); ok { 671 r0 = rf(_a0, _a1...) 672 } else { 673 r0 = ret.Error(0) 674 } 675 676 return r0 677 } 678 679 // UpdateWorkload provides a mock function with given fields: ctx, workload 680 func (_m *Store) UpdateWorkload(ctx context.Context, workload *types.Workload) error { 681 ret := _m.Called(ctx, workload) 682 683 var r0 error 684 if rf, ok := ret.Get(0).(func(context.Context, *types.Workload) error); ok { 685 r0 = rf(ctx, workload) 686 } else { 687 r0 = ret.Error(0) 688 } 689 690 return r0 691 } 692 693 // WorkloadStatusStream provides a mock function with given fields: ctx, appname, entrypoint, nodename, labels 694 func (_m *Store) WorkloadStatusStream(ctx context.Context, appname string, entrypoint string, nodename string, labels map[string]string) chan *types.WorkloadStatus { 695 ret := _m.Called(ctx, appname, entrypoint, nodename, labels) 696 697 var r0 chan *types.WorkloadStatus 698 if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string) chan *types.WorkloadStatus); ok { 699 r0 = rf(ctx, appname, entrypoint, nodename, labels) 700 } else { 701 if ret.Get(0) != nil { 702 r0 = ret.Get(0).(chan *types.WorkloadStatus) 703 } 704 } 705 706 return r0 707 } 708 709 // NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 710 // The first argument is typically a *testing.T value. 711 func NewStore(t interface { 712 mock.TestingT 713 Cleanup(func()) 714 }) *Store { 715 mock := &Store{} 716 mock.Mock.Test(t) 717 718 t.Cleanup(func() { mock.AssertExpectations(t) }) 719 720 return mock 721 }