mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-30 14:56:19 +00:00
## What changed? Add new rate limiter priority to support high/low replication tier ## Why? high replication tier has higher priority than the low replication tier. The task processing part is separated. This change allow us throttled low replication tier first. ## How did you test it? - [x] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s)
59 lines
2.0 KiB
Go
59 lines
2.0 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: raw_task_converter.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package replication -source raw_task_converter.go -destination raw_task_converter_mock.go
|
|
//
|
|
|
|
// Package replication is a generated GoMock package.
|
|
package replication
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
enums "go.temporal.io/server/api/enums/v1"
|
|
repication "go.temporal.io/server/api/replication/v1"
|
|
tasks "go.temporal.io/server/service/history/tasks"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockSourceTaskConverter is a mock of SourceTaskConverter interface.
|
|
type MockSourceTaskConverter struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockSourceTaskConverterMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockSourceTaskConverterMockRecorder is the mock recorder for MockSourceTaskConverter.
|
|
type MockSourceTaskConverterMockRecorder struct {
|
|
mock *MockSourceTaskConverter
|
|
}
|
|
|
|
// NewMockSourceTaskConverter creates a new mock instance.
|
|
func NewMockSourceTaskConverter(ctrl *gomock.Controller) *MockSourceTaskConverter {
|
|
mock := &MockSourceTaskConverter{ctrl: ctrl}
|
|
mock.recorder = &MockSourceTaskConverterMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockSourceTaskConverter) EXPECT() *MockSourceTaskConverterMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Convert mocks base method.
|
|
func (m *MockSourceTaskConverter) Convert(task tasks.Task, targetClusterID int32, priority enums.TaskPriority) (*repication.ReplicationTask, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Convert", task, targetClusterID, priority)
|
|
ret0, _ := ret[0].(*repication.ReplicationTask)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Convert indicates an expected call of Convert.
|
|
func (mr *MockSourceTaskConverterMockRecorder) Convert(task, targetClusterID, priority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Convert", reflect.TypeOf((*MockSourceTaskConverter)(nil).Convert), task, targetClusterID, priority)
|
|
}
|