distlock

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Unlicense Imports: 10 Imported by: 0

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

func NewDistock

func NewDistock(t tracer.Tracer, store redis.Client) DistLock

NewDistock returns a 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

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

func (*MockDistLock) Release

func (m *MockDistLock) Release(ctx context.Context, key string) bool

Release mocks base method.

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.

Jump to

Keyboard shortcuts

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