Documentation ¶
Overview ¶
Package distlock is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistLock ¶
type DistLock interface { Acquire(ctx context.Context, key string, duration time.Duration, retryCount int) bool Release(ctx context.Context, key string) bool }
A DistLock is a redis lock.
func NewDistlockNoop ¶
func NewDistlockNoop() DistLock
type MockDistLock ¶
type MockDistLock struct {
// contains filtered or unexported fields
}
MockDistLock is a mock of DistLock interface.
func NewMockDistLock ¶
func NewMockDistLock(ctrl *gomock.Controller) *MockDistLock
NewMockDistLock creates a new mock instance.
func (*MockDistLock) Acquire ¶
func (m *MockDistLock) Acquire(ctx context.Context, key string, duration time.Duration, retryCount int) bool
Acquire mocks base method.
func (*MockDistLock) EXPECT ¶
func (m *MockDistLock) EXPECT() *MockDistLockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockDistLockMockRecorder ¶
type MockDistLockMockRecorder struct {
// contains filtered or unexported fields
}
MockDistLockMockRecorder is the mock recorder for MockDistLock.
func (*MockDistLockMockRecorder) Acquire ¶
func (mr *MockDistLockMockRecorder) Acquire(ctx, key, duration, retryCount interface{}) *gomock.Call
Acquire indicates an expected call of Acquire.
func (*MockDistLockMockRecorder) Release ¶
func (mr *MockDistLockMockRecorder) Release(ctx, key interface{}) *gomock.Call
Release indicates an expected call of Release.
Click to show internal directories.
Click to hide internal directories.