Documentation ¶
Overview ¶
Package mock_lock is a generated GoMock package.
Index ¶
- type MockClient
- type MockClientMockRecorder
- type MockLockService
- func (m *MockLockService) Close() error
- func (m *MockLockService) CloseRemoteLockTable(group uint32, tableID, version uint64) (bool, error)
- func (m *MockLockService) EXPECT() *MockLockServiceMockRecorder
- func (m *MockLockService) ForceRefreshLockTableBinds(targets []uint64, matcher func(lock.LockTable) bool)
- func (m *MockLockService) GetConfig() lockservice.Config
- func (m *MockLockService) GetLockTableBind(group uint32, tableID uint64) (lock.LockTable, error)
- func (m *MockLockService) GetServiceID() string
- func (m *MockLockService) GetWaitingList(ctx context.Context, txnID []byte) (bool, []lock.WaitTxn, error)
- func (m *MockLockService) IsOrphanTxn(arg0 context.Context, arg1 []byte) (bool, error)
- func (m *MockLockService) IterLocks(arg0 func(uint64, [][]byte, lockservice.Lock) bool)
- func (m *MockLockService) Lock(ctx context.Context, tableID uint64, rows [][]byte, txnID []byte, ...) (lock.Result, error)
- func (m *MockLockService) Unlock(ctx context.Context, txnID []byte, commitTS timestamp.Timestamp, ...) error
- type MockLockServiceMockRecorder
- func (mr *MockLockServiceMockRecorder) Close() *gomock.Call
- func (mr *MockLockServiceMockRecorder) CloseRemoteLockTable(group, tableID, version any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) ForceRefreshLockTableBinds(targets, matcher any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) GetConfig() *gomock.Call
- func (mr *MockLockServiceMockRecorder) GetLockTableBind(group, tableID any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) GetServiceID() *gomock.Call
- func (mr *MockLockServiceMockRecorder) GetWaitingList(ctx, txnID any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) IsOrphanTxn(arg0, arg1 any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) IterLocks(arg0 any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) Lock(ctx, tableID, rows, txnID, options any) *gomock.Call
- func (mr *MockLockServiceMockRecorder) Unlock(ctx, txnID, commitTS any, mutations ...any) *gomock.Call
- type MockLockStorage
- func (m *MockLockStorage) Add(key []byte, value lockservice.Lock)
- func (m *MockLockStorage) Clear()
- func (m *MockLockStorage) Delete(key []byte) (lockservice.Lock, bool)
- func (m *MockLockStorage) EXPECT() *MockLockStorageMockRecorder
- func (m *MockLockStorage) Get(key []byte) (lockservice.Lock, bool)
- func (m *MockLockStorage) Iter(arg0 func([]byte, lockservice.Lock) bool)
- func (m *MockLockStorage) Len() int
- func (m *MockLockStorage) Prev(key []byte) ([]byte, lockservice.Lock, bool)
- func (m *MockLockStorage) Range(start, end []byte, fn func([]byte, lockservice.Lock) bool)
- func (m *MockLockStorage) Seek(key []byte) ([]byte, lockservice.Lock, bool)
- type MockLockStorageMockRecorder
- func (mr *MockLockStorageMockRecorder) Add(key, value any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Clear() *gomock.Call
- func (mr *MockLockStorageMockRecorder) Delete(key any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Get(key any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Iter(arg0 any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Len() *gomock.Call
- func (mr *MockLockStorageMockRecorder) Prev(key any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Range(start, end, fn any) *gomock.Call
- func (mr *MockLockStorageMockRecorder) Seek(key any) *gomock.Call
- type MockLockTableAllocator
- func (m *MockLockTableAllocator) AddCannotCommit(values []lock.OrphanTxn) [][]byte
- func (m *MockLockTableAllocator) Close() error
- func (m *MockLockTableAllocator) EXPECT() *MockLockTableAllocatorMockRecorder
- func (m *MockLockTableAllocator) Get(serviceID string, group uint32, tableID, originTableID uint64, ...) lock.LockTable
- func (m *MockLockTableAllocator) GetLatest(groupID uint32, tableID uint64) lock.LockTable
- func (m *MockLockTableAllocator) GetVersion() uint64
- func (m *MockLockTableAllocator) KeepLockTableBind(serviceID string) bool
- func (m *MockLockTableAllocator) Valid(serviceID string, txnID []byte, binds []lock.LockTable) ([]uint64, error)
- type MockLockTableAllocatorMockRecorder
- func (mr *MockLockTableAllocatorMockRecorder) AddCannotCommit(values any) *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) Close() *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) Get(serviceID, group, tableID, originTableID, sharding any) *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) GetLatest(groupID, tableID any) *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) GetVersion() *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) KeepLockTableBind(serviceID any) *gomock.Call
- func (mr *MockLockTableAllocatorMockRecorder) Valid(serviceID, txnID, binds any) *gomock.Call
- type MockLockTableKeeper
- type MockLockTableKeeperMockRecorder
- type MockServer
- type MockServerMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct {
// contains filtered or unexported fields
}
MockClient is a mock of Client interface.
func NewMockClient ¶
func NewMockClient(ctrl *gomock.Controller) *MockClient
NewMockClient creates a new mock instance.
func (*MockClient) EXPECT ¶
func (m *MockClient) EXPECT() *MockClientMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockClientMockRecorder ¶
type MockClientMockRecorder struct {
// contains filtered or unexported fields
}
MockClientMockRecorder is the mock recorder for MockClient.
func (*MockClientMockRecorder) AsyncSend ¶
func (mr *MockClientMockRecorder) AsyncSend(arg0, arg1 any) *gomock.Call
AsyncSend indicates an expected call of AsyncSend.
func (*MockClientMockRecorder) Close ¶
func (mr *MockClientMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
type MockLockService ¶
type MockLockService struct {
// contains filtered or unexported fields
}
MockLockService is a mock of LockService interface.
func NewMockLockService ¶
func NewMockLockService(ctrl *gomock.Controller) *MockLockService
NewMockLockService creates a new mock instance.
func (*MockLockService) CloseRemoteLockTable ¶
func (m *MockLockService) CloseRemoteLockTable(group uint32, tableID, version uint64) (bool, error)
CloseRemoteLockTable mocks base method.
func (*MockLockService) EXPECT ¶
func (m *MockLockService) EXPECT() *MockLockServiceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLockService) ForceRefreshLockTableBinds ¶
func (m *MockLockService) ForceRefreshLockTableBinds(targets []uint64, matcher func(lock.LockTable) bool)
ForceRefreshLockTableBinds mocks base method.
func (*MockLockService) GetConfig ¶
func (m *MockLockService) GetConfig() lockservice.Config
GetConfig mocks base method.
func (*MockLockService) GetLockTableBind ¶
GetLockTableBind mocks base method.
func (*MockLockService) GetServiceID ¶
func (m *MockLockService) GetServiceID() string
GetServiceID mocks base method.
func (*MockLockService) GetWaitingList ¶
func (m *MockLockService) GetWaitingList(ctx context.Context, txnID []byte) (bool, []lock.WaitTxn, error)
GetWaitingList mocks base method.
func (*MockLockService) IsOrphanTxn ¶
IsOrphanTxn mocks base method.
func (*MockLockService) IterLocks ¶
func (m *MockLockService) IterLocks(arg0 func(uint64, [][]byte, lockservice.Lock) bool)
IterLocks mocks base method.
type MockLockServiceMockRecorder ¶
type MockLockServiceMockRecorder struct {
// contains filtered or unexported fields
}
MockLockServiceMockRecorder is the mock recorder for MockLockService.
func (*MockLockServiceMockRecorder) Close ¶
func (mr *MockLockServiceMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockLockServiceMockRecorder) CloseRemoteLockTable ¶
func (mr *MockLockServiceMockRecorder) CloseRemoteLockTable(group, tableID, version any) *gomock.Call
CloseRemoteLockTable indicates an expected call of CloseRemoteLockTable.
func (*MockLockServiceMockRecorder) ForceRefreshLockTableBinds ¶
func (mr *MockLockServiceMockRecorder) ForceRefreshLockTableBinds(targets, matcher any) *gomock.Call
ForceRefreshLockTableBinds indicates an expected call of ForceRefreshLockTableBinds.
func (*MockLockServiceMockRecorder) GetConfig ¶
func (mr *MockLockServiceMockRecorder) GetConfig() *gomock.Call
GetConfig indicates an expected call of GetConfig.
func (*MockLockServiceMockRecorder) GetLockTableBind ¶
func (mr *MockLockServiceMockRecorder) GetLockTableBind(group, tableID any) *gomock.Call
GetLockTableBind indicates an expected call of GetLockTableBind.
func (*MockLockServiceMockRecorder) GetServiceID ¶
func (mr *MockLockServiceMockRecorder) GetServiceID() *gomock.Call
GetServiceID indicates an expected call of GetServiceID.
func (*MockLockServiceMockRecorder) GetWaitingList ¶
func (mr *MockLockServiceMockRecorder) GetWaitingList(ctx, txnID any) *gomock.Call
GetWaitingList indicates an expected call of GetWaitingList.
func (*MockLockServiceMockRecorder) IsOrphanTxn ¶
func (mr *MockLockServiceMockRecorder) IsOrphanTxn(arg0, arg1 any) *gomock.Call
IsOrphanTxn indicates an expected call of IsOrphanTxn.
func (*MockLockServiceMockRecorder) IterLocks ¶
func (mr *MockLockServiceMockRecorder) IterLocks(arg0 any) *gomock.Call
IterLocks indicates an expected call of IterLocks.
type MockLockStorage ¶
type MockLockStorage struct {
// contains filtered or unexported fields
}
MockLockStorage is a mock of LockStorage interface.
func NewMockLockStorage ¶
func NewMockLockStorage(ctrl *gomock.Controller) *MockLockStorage
NewMockLockStorage creates a new mock instance.
func (*MockLockStorage) Add ¶
func (m *MockLockStorage) Add(key []byte, value lockservice.Lock)
Add mocks base method.
func (*MockLockStorage) Delete ¶
func (m *MockLockStorage) Delete(key []byte) (lockservice.Lock, bool)
Delete mocks base method.
func (*MockLockStorage) EXPECT ¶
func (m *MockLockStorage) EXPECT() *MockLockStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLockStorage) Get ¶
func (m *MockLockStorage) Get(key []byte) (lockservice.Lock, bool)
Get mocks base method.
func (*MockLockStorage) Iter ¶
func (m *MockLockStorage) Iter(arg0 func([]byte, lockservice.Lock) bool)
Iter mocks base method.
func (*MockLockStorage) Prev ¶
func (m *MockLockStorage) Prev(key []byte) ([]byte, lockservice.Lock, bool)
Prev mocks base method.
func (*MockLockStorage) Range ¶
func (m *MockLockStorage) Range(start, end []byte, fn func([]byte, lockservice.Lock) bool)
Range mocks base method.
func (*MockLockStorage) Seek ¶
func (m *MockLockStorage) Seek(key []byte) ([]byte, lockservice.Lock, bool)
Seek mocks base method.
type MockLockStorageMockRecorder ¶
type MockLockStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockLockStorageMockRecorder is the mock recorder for MockLockStorage.
func (*MockLockStorageMockRecorder) Add ¶
func (mr *MockLockStorageMockRecorder) Add(key, value any) *gomock.Call
Add indicates an expected call of Add.
func (*MockLockStorageMockRecorder) Clear ¶
func (mr *MockLockStorageMockRecorder) Clear() *gomock.Call
Clear indicates an expected call of Clear.
func (*MockLockStorageMockRecorder) Delete ¶
func (mr *MockLockStorageMockRecorder) Delete(key any) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockLockStorageMockRecorder) Get ¶
func (mr *MockLockStorageMockRecorder) Get(key any) *gomock.Call
Get indicates an expected call of Get.
func (*MockLockStorageMockRecorder) Iter ¶
func (mr *MockLockStorageMockRecorder) Iter(arg0 any) *gomock.Call
Iter indicates an expected call of Iter.
func (*MockLockStorageMockRecorder) Len ¶
func (mr *MockLockStorageMockRecorder) Len() *gomock.Call
Len indicates an expected call of Len.
func (*MockLockStorageMockRecorder) Prev ¶
func (mr *MockLockStorageMockRecorder) Prev(key any) *gomock.Call
Prev indicates an expected call of Prev.
type MockLockTableAllocator ¶
type MockLockTableAllocator struct {
// contains filtered or unexported fields
}
MockLockTableAllocator is a mock of LockTableAllocator interface.
func NewMockLockTableAllocator ¶
func NewMockLockTableAllocator(ctrl *gomock.Controller) *MockLockTableAllocator
NewMockLockTableAllocator creates a new mock instance.
func (*MockLockTableAllocator) AddCannotCommit ¶
func (m *MockLockTableAllocator) AddCannotCommit(values []lock.OrphanTxn) [][]byte
AddCannotCommit mocks base method.
func (*MockLockTableAllocator) Close ¶
func (m *MockLockTableAllocator) Close() error
Close mocks base method.
func (*MockLockTableAllocator) EXPECT ¶
func (m *MockLockTableAllocator) EXPECT() *MockLockTableAllocatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLockTableAllocator) Get ¶
func (m *MockLockTableAllocator) Get(serviceID string, group uint32, tableID, originTableID uint64, sharding lock.Sharding) lock.LockTable
Get mocks base method.
func (*MockLockTableAllocator) GetLatest ¶
func (m *MockLockTableAllocator) GetLatest(groupID uint32, tableID uint64) lock.LockTable
GetLatest mocks base method.
func (*MockLockTableAllocator) GetVersion ¶
func (m *MockLockTableAllocator) GetVersion() uint64
GetVersion mocks base method.
func (*MockLockTableAllocator) KeepLockTableBind ¶
func (m *MockLockTableAllocator) KeepLockTableBind(serviceID string) bool
KeepLockTableBind mocks base method.
type MockLockTableAllocatorMockRecorder ¶
type MockLockTableAllocatorMockRecorder struct {
// contains filtered or unexported fields
}
MockLockTableAllocatorMockRecorder is the mock recorder for MockLockTableAllocator.
func (*MockLockTableAllocatorMockRecorder) AddCannotCommit ¶
func (mr *MockLockTableAllocatorMockRecorder) AddCannotCommit(values any) *gomock.Call
AddCannotCommit indicates an expected call of AddCannotCommit.
func (*MockLockTableAllocatorMockRecorder) Close ¶
func (mr *MockLockTableAllocatorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockLockTableAllocatorMockRecorder) Get ¶
func (mr *MockLockTableAllocatorMockRecorder) Get(serviceID, group, tableID, originTableID, sharding any) *gomock.Call
Get indicates an expected call of Get.
func (*MockLockTableAllocatorMockRecorder) GetLatest ¶
func (mr *MockLockTableAllocatorMockRecorder) GetLatest(groupID, tableID any) *gomock.Call
GetLatest indicates an expected call of GetLatest.
func (*MockLockTableAllocatorMockRecorder) GetVersion ¶
func (mr *MockLockTableAllocatorMockRecorder) GetVersion() *gomock.Call
GetVersion indicates an expected call of GetVersion.
func (*MockLockTableAllocatorMockRecorder) KeepLockTableBind ¶
func (mr *MockLockTableAllocatorMockRecorder) KeepLockTableBind(serviceID any) *gomock.Call
KeepLockTableBind indicates an expected call of KeepLockTableBind.
type MockLockTableKeeper ¶
type MockLockTableKeeper struct {
// contains filtered or unexported fields
}
MockLockTableKeeper is a mock of LockTableKeeper interface.
func NewMockLockTableKeeper ¶
func NewMockLockTableKeeper(ctrl *gomock.Controller) *MockLockTableKeeper
NewMockLockTableKeeper creates a new mock instance.
func (*MockLockTableKeeper) Close ¶
func (m *MockLockTableKeeper) Close() error
Close mocks base method.
func (*MockLockTableKeeper) EXPECT ¶
func (m *MockLockTableKeeper) EXPECT() *MockLockTableKeeperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockLockTableKeeperMockRecorder ¶
type MockLockTableKeeperMockRecorder struct {
// contains filtered or unexported fields
}
MockLockTableKeeperMockRecorder is the mock recorder for MockLockTableKeeper.
func (*MockLockTableKeeperMockRecorder) Close ¶
func (mr *MockLockTableKeeperMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
type MockServer ¶
type MockServer struct {
// contains filtered or unexported fields
}
MockServer is a mock of Server interface.
func NewMockServer ¶
func NewMockServer(ctrl *gomock.Controller) *MockServer
NewMockServer creates a new mock instance.
func (*MockServer) EXPECT ¶
func (m *MockServer) EXPECT() *MockServerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockServer) RegisterMethodHandler ¶
func (m *MockServer) RegisterMethodHandler(arg0 lock.Method, arg1 lockservice.RequestHandleFunc)
RegisterMethodHandler mocks base method.
type MockServerMockRecorder ¶
type MockServerMockRecorder struct {
// contains filtered or unexported fields
}
MockServerMockRecorder is the mock recorder for MockServer.
func (*MockServerMockRecorder) Close ¶
func (mr *MockServerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockServerMockRecorder) RegisterMethodHandler ¶
func (mr *MockServerMockRecorder) RegisterMethodHandler(arg0, arg1 any) *gomock.Call
RegisterMethodHandler indicates an expected call of RegisterMethodHandler.
func (*MockServerMockRecorder) Start ¶
func (mr *MockServerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.