mock_lock

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mock_lock is a generated GoMock package.

Index

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) AsyncSend

func (m *MockClient) AsyncSend(arg0 context.Context, arg1 *lock.Request) (*morpc.Future, error)

AsyncSend mocks base method.

func (*MockClient) Close

func (m *MockClient) Close() error

Close mocks base method.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) Send

func (m *MockClient) Send(arg0 context.Context, arg1 *lock.Request) (*lock.Response, error)

Send mocks base method.

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.

func (*MockClientMockRecorder) Send

func (mr *MockClientMockRecorder) Send(arg0, arg1 any) *gomock.Call

Send indicates an expected call of Send.

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) Close

func (m *MockLockService) Close() error

Close mocks base method.

func (*MockLockService) CloseRemoteLockTable

func (m *MockLockService) CloseRemoteLockTable(group uint32, tableID, version uint64) (bool, error)

CloseRemoteLockTable mocks base method.

func (*MockLockService) EXPECT

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

func (m *MockLockService) GetLockTableBind(group uint32, tableID uint64) (lock.LockTable, error)

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

func (m *MockLockService) IsOrphanTxn(arg0 context.Context, arg1 []byte) (bool, error)

IsOrphanTxn mocks base method.

func (*MockLockService) IterLocks

func (m *MockLockService) IterLocks(arg0 func(uint64, [][]byte, lockservice.Lock) bool)

IterLocks mocks base method.

func (*MockLockService) Lock

func (m *MockLockService) Lock(ctx context.Context, tableID uint64, rows [][]byte, txnID []byte, options lock.LockOptions) (lock.Result, error)

Lock mocks base method.

func (*MockLockService) Unlock

func (m *MockLockService) Unlock(ctx context.Context, txnID []byte, commitTS timestamp.Timestamp, mutations ...lock.ExtraMutation) error

Unlock mocks base method.

type MockLockServiceMockRecorder

type MockLockServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockLockServiceMockRecorder is the mock recorder for MockLockService.

func (*MockLockServiceMockRecorder) Close

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.

func (*MockLockServiceMockRecorder) Lock

func (mr *MockLockServiceMockRecorder) Lock(ctx, tableID, rows, txnID, options any) *gomock.Call

Lock indicates an expected call of Lock.

func (*MockLockServiceMockRecorder) Unlock

func (mr *MockLockServiceMockRecorder) Unlock(ctx, txnID, commitTS any, mutations ...any) *gomock.Call

Unlock indicates an expected call of Unlock.

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) Clear

func (m *MockLockStorage) Clear()

Clear mocks base method.

func (*MockLockStorage) Delete

func (m *MockLockStorage) Delete(key []byte) (lockservice.Lock, bool)

Delete mocks base method.

func (*MockLockStorage) EXPECT

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) Len

func (m *MockLockStorage) Len() int

Len 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

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

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

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.

func (*MockLockStorageMockRecorder) Range

func (mr *MockLockStorageMockRecorder) Range(start, end, fn any) *gomock.Call

Range indicates an expected call of Range.

func (*MockLockStorageMockRecorder) Seek

func (mr *MockLockStorageMockRecorder) Seek(key any) *gomock.Call

Seek indicates an expected call of Seek.

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

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.

func (*MockLockTableAllocator) Valid

func (m *MockLockTableAllocator) Valid(serviceID string, txnID []byte, binds []lock.LockTable) ([]uint64, error)

Valid 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

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

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.

func (*MockLockTableAllocatorMockRecorder) Valid

func (mr *MockLockTableAllocatorMockRecorder) Valid(serviceID, txnID, binds any) *gomock.Call

Valid indicates an expected call of Valid.

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

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

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) Close

func (m *MockServer) Close() error

Close mocks base method.

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.

func (*MockServer) Start

func (m *MockServer) Start() error

Start 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL