mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-30 14:56:19 +00:00
## What changed? - Use archetypeID everywhere in history service and pass them to persistence ## Why? - Required for separate ID space work. ## How did you test it? - [x] built - [ ] run locally and tested manually - [x] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s)
151 lines
7.7 KiB
Go
151 lines
7.7 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: consistency_checker.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -package api -source consistency_checker.go -destination consistency_checker_mock.go
|
|
//
|
|
|
|
// Package api is a generated GoMock package.
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
clock "go.temporal.io/server/api/clock/v1"
|
|
chasm "go.temporal.io/server/chasm"
|
|
definition "go.temporal.io/server/common/definition"
|
|
locks "go.temporal.io/server/common/locks"
|
|
cache "go.temporal.io/server/service/history/workflow/cache"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockWorkflowConsistencyChecker is a mock of WorkflowConsistencyChecker interface.
|
|
type MockWorkflowConsistencyChecker struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockWorkflowConsistencyCheckerMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockWorkflowConsistencyCheckerMockRecorder is the mock recorder for MockWorkflowConsistencyChecker.
|
|
type MockWorkflowConsistencyCheckerMockRecorder struct {
|
|
mock *MockWorkflowConsistencyChecker
|
|
}
|
|
|
|
// NewMockWorkflowConsistencyChecker creates a new mock instance.
|
|
func NewMockWorkflowConsistencyChecker(ctrl *gomock.Controller) *MockWorkflowConsistencyChecker {
|
|
mock := &MockWorkflowConsistencyChecker{ctrl: ctrl}
|
|
mock.recorder = &MockWorkflowConsistencyCheckerMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockWorkflowConsistencyChecker) EXPECT() *MockWorkflowConsistencyCheckerMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// GetChasmLease mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetChasmLease(ctx context.Context, reqClock *clock.VectorClock, workflowKey definition.WorkflowKey, archetypeID chasm.ArchetypeID, lockPriority locks.Priority) (WorkflowLease, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetChasmLease", ctx, reqClock, workflowKey, archetypeID, lockPriority)
|
|
ret0, _ := ret[0].(WorkflowLease)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetChasmLease indicates an expected call of GetChasmLease.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetChasmLease(ctx, reqClock, workflowKey, archetypeID, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChasmLease", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetChasmLease), ctx, reqClock, workflowKey, archetypeID, lockPriority)
|
|
}
|
|
|
|
// GetChasmLeaseWithConsistencyCheck mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetChasmLeaseWithConsistencyCheck(ctx context.Context, reqClock *clock.VectorClock, consistencyPredicate MutableStateConsistencyPredicate, workflowKey definition.WorkflowKey, archetypeID chasm.ArchetypeID, lockPriority locks.Priority) (WorkflowLease, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetChasmLeaseWithConsistencyCheck", ctx, reqClock, consistencyPredicate, workflowKey, archetypeID, lockPriority)
|
|
ret0, _ := ret[0].(WorkflowLease)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetChasmLeaseWithConsistencyCheck indicates an expected call of GetChasmLeaseWithConsistencyCheck.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetChasmLeaseWithConsistencyCheck(ctx, reqClock, consistencyPredicate, workflowKey, archetypeID, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChasmLeaseWithConsistencyCheck", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetChasmLeaseWithConsistencyCheck), ctx, reqClock, consistencyPredicate, workflowKey, archetypeID, lockPriority)
|
|
}
|
|
|
|
// GetCurrentChasmRunID mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetCurrentChasmRunID(ctx context.Context, namespaceID, workflowID string, archetypeID chasm.ArchetypeID, lockPriority locks.Priority) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetCurrentChasmRunID", ctx, namespaceID, workflowID, archetypeID, lockPriority)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetCurrentChasmRunID indicates an expected call of GetCurrentChasmRunID.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetCurrentChasmRunID(ctx, namespaceID, workflowID, archetypeID, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentChasmRunID", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetCurrentChasmRunID), ctx, namespaceID, workflowID, archetypeID, lockPriority)
|
|
}
|
|
|
|
// GetCurrentWorkflowRunID mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetCurrentWorkflowRunID(ctx context.Context, namespaceID, workflowID string, lockPriority locks.Priority) (string, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetCurrentWorkflowRunID", ctx, namespaceID, workflowID, lockPriority)
|
|
ret0, _ := ret[0].(string)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetCurrentWorkflowRunID indicates an expected call of GetCurrentWorkflowRunID.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetCurrentWorkflowRunID(ctx, namespaceID, workflowID, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentWorkflowRunID", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetCurrentWorkflowRunID), ctx, namespaceID, workflowID, lockPriority)
|
|
}
|
|
|
|
// GetWorkflowCache mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetWorkflowCache() cache.Cache {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetWorkflowCache")
|
|
ret0, _ := ret[0].(cache.Cache)
|
|
return ret0
|
|
}
|
|
|
|
// GetWorkflowCache indicates an expected call of GetWorkflowCache.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetWorkflowCache() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowCache", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetWorkflowCache))
|
|
}
|
|
|
|
// GetWorkflowLease mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetWorkflowLease(ctx context.Context, reqClock *clock.VectorClock, workflowKey definition.WorkflowKey, lockPriority locks.Priority) (WorkflowLease, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetWorkflowLease", ctx, reqClock, workflowKey, lockPriority)
|
|
ret0, _ := ret[0].(WorkflowLease)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetWorkflowLease indicates an expected call of GetWorkflowLease.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetWorkflowLease(ctx, reqClock, workflowKey, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowLease", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetWorkflowLease), ctx, reqClock, workflowKey, lockPriority)
|
|
}
|
|
|
|
// GetWorkflowLeaseWithConsistencyCheck mocks base method.
|
|
func (m *MockWorkflowConsistencyChecker) GetWorkflowLeaseWithConsistencyCheck(ctx context.Context, reqClock *clock.VectorClock, consistencyPredicate MutableStateConsistencyPredicate, workflowKey definition.WorkflowKey, lockPriority locks.Priority) (WorkflowLease, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "GetWorkflowLeaseWithConsistencyCheck", ctx, reqClock, consistencyPredicate, workflowKey, lockPriority)
|
|
ret0, _ := ret[0].(WorkflowLease)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// GetWorkflowLeaseWithConsistencyCheck indicates an expected call of GetWorkflowLeaseWithConsistencyCheck.
|
|
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetWorkflowLeaseWithConsistencyCheck(ctx, reqClock, consistencyPredicate, workflowKey, lockPriority any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkflowLeaseWithConsistencyCheck", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetWorkflowLeaseWithConsistencyCheck), ctx, reqClock, consistencyPredicate, workflowKey, lockPriority)
|
|
}
|