Files
tasks/service/matching/db_task_reader_mock.go
wxing1292andGitHub 1ac44ee0c6 Update iterator to use go generics (#2672)
* Update iterator to use go generics
* Remove unused collections
2022-03-29 13:30:40 -07:00

103 lines
3.8 KiB
Go

// The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Code generated by MockGen. DO NOT EDIT.
// Source: db_task_reader.go
// Package matching is a generated GoMock package.
package matching
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
persistencespb "go.temporal.io/server/api/persistence/v1"
collection "go.temporal.io/server/common/collection"
)
// MockdbTaskReader is a mock of dbTaskReader interface.
type MockdbTaskReader struct {
ctrl *gomock.Controller
recorder *MockdbTaskReaderMockRecorder
}
// MockdbTaskReaderMockRecorder is the mock recorder for MockdbTaskReader.
type MockdbTaskReaderMockRecorder struct {
mock *MockdbTaskReader
}
// NewMockdbTaskReader creates a new mock instance.
func NewMockdbTaskReader(ctrl *gomock.Controller) *MockdbTaskReader {
mock := &MockdbTaskReader{ctrl: ctrl}
mock.recorder = &MockdbTaskReaderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockdbTaskReader) EXPECT() *MockdbTaskReaderMockRecorder {
return m.recorder
}
// ackTask mocks base method.
func (m *MockdbTaskReader) ackTask(taskID int64) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "ackTask", taskID)
}
// ackTask indicates an expected call of ackTask.
func (mr *MockdbTaskReaderMockRecorder) ackTask(taskID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ackTask", reflect.TypeOf((*MockdbTaskReader)(nil).ackTask), taskID)
}
// moveAckedTaskID mocks base method.
func (m *MockdbTaskReader) moveAckedTaskID() int64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "moveAckedTaskID")
ret0, _ := ret[0].(int64)
return ret0
}
// moveAckedTaskID indicates an expected call of moveAckedTaskID.
func (mr *MockdbTaskReaderMockRecorder) moveAckedTaskID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "moveAckedTaskID", reflect.TypeOf((*MockdbTaskReader)(nil).moveAckedTaskID))
}
// taskIterator mocks base method.
func (m *MockdbTaskReader) taskIterator(ctx context.Context, maxTaskID int64) collection.Iterator[*persistencespb.AllocatedTaskInfo] {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "taskIterator", ctx, maxTaskID)
ret0, _ := ret[0].(collection.Iterator[*persistencespb.AllocatedTaskInfo])
return ret0
}
// taskIterator indicates an expected call of taskIterator.
func (mr *MockdbTaskReaderMockRecorder) taskIterator(ctx, maxTaskID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "taskIterator", reflect.TypeOf((*MockdbTaskReader)(nil).taskIterator), ctx, maxTaskID)
}