Files
tasks/service/history/api/consistency_checker_mock.go
Alex ShtinandGitHub 8e8f1b0f7c Remove license header from every file (#7689)
## What changed?
<!-- Describe what has changed in this PR -->
Remove license header from every file. Because it is really hard to
follow in this PR here is the summary:
1. License header is removed from all `.go` and `.proto` files
:fireworks::fireworks:🎆.
2. `LICENSE` file in the root directory has only Temporal and Uber
copyrights.
3. 5 other `LICENSE` files added to the packages which have copyrights
different from Temporal and Uber: Datadog, Xargin, "Mat Ryer, Tyler
Bunnell and contributors".
4. `license_file` flag is removed from all code generation tools.
5. `copyright_file` flag is removed from `go:generate mockgen`
directive.
6. All copyright related targets are removed from `Makefile`.
7. Updated Temporal copyright year to 2025 everywhere.

## Why?
<!-- Tell your future self why have you made these changes -->
I double checked with legal department that it is not needed to have
license header in every file. One file per repo is enough. I put all
copyrights to the root `LICENSE` file and removed header from all other
files. Also updated tools and `Makefile`.
2025-05-01 18:50:21 -07:00

105 lines
4.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"
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
}
// GetCurrentRunID mocks base method.
func (m *MockWorkflowConsistencyChecker) GetCurrentRunID(ctx context.Context, namespaceID, workflowID string, lockPriority locks.Priority) (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetCurrentRunID", ctx, namespaceID, workflowID, lockPriority)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetCurrentRunID indicates an expected call of GetCurrentRunID.
func (mr *MockWorkflowConsistencyCheckerMockRecorder) GetCurrentRunID(ctx, namespaceID, workflowID, lockPriority any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentRunID", reflect.TypeOf((*MockWorkflowConsistencyChecker)(nil).GetCurrentRunID), 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)
}